Image data into database

Post here if you need help with SQL.
Post Reply
User avatar
Robbedoesie
Posts: 97
Joined: Thu May 19, 2011 7:37 pm
Location: Enkhuizen, Holland

Image data into database

Post 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.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Image data into database

Post by jacek »

Your } brackets should be ) styles ones.
Image
Post Reply