Image data into database
Posted: Sun Nov 20, 2011 8:45 pm
Hello, i am trying to get the filenames from the images in the mysql database but the filenames does not shows up. I think i am using the INSERT INTO codes wrong, but i don't know where i am going wrong.
Thanks.
$images = glob('*.{jpg,JPG,jpeg,JPEG,png,PNG,gif,GIF}', GLOB_BRACE); mysql_query("INSERT INTO `fotogallery` . `photographs` {`id` ,`filename`} VALUES (NULL, '$images')") ;In my database i am using
->id INT(11) NOT NULL AUTO_INCREMENT, ->filename VARCHAR(255) NOT NULLI hope somebody can help me out here,
Thanks.