Page 1 of 1

Image data into database

Posted: Sun Nov 20, 2011 8:45 pm
by Robbedoesie
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.
$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 NULL
I hope somebody can help me out here,
Thanks.

Re: Image data into database

Posted: Sun Nov 20, 2011 11:29 pm
by jacek
Your } brackets should be ) styles ones.