I have a loop that inserts descriptions and thumbnails into a table, but not all the items in the loop have descriptions and thumbnails. I didn't think this was a problem, but sql won't insert it, unless they have a value. I thought it might be cause by the not null thing, so i tried to change "null" to "yes".
I set it to print out the executed query and the mysql error:
Query: INSERT INTO experiments (title, dir, desc, thumbnail) VALUES('3dbox', '3dbox', '', '')
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, thumbnail) VALUES('3dbox', '3dbox', '', '')' at line 1
I've also tried this:
$d = @file_get_contents("/experiments/$sites[$i]/desc.txt") or false;
but that doesn't work either, as you can see in the query.