PDA

View Full Version : not working but yet no error


Dimava
Tue 21st May '02, 8:40pm
$query = "INSERT INTO tutorials ( title, username, images, group, description ) values ( '$title', '$username', '$images', '$category', '$description' )";
mysql_query($query);


this code isn't adding the stuff to the db, nor is it giving me any errors, what could be wrong?

thanks

Dimava

Mark Hensler
Wed 22nd May '02, 12:36am
// blah blah blah
if (!mysql_query($query)) {
echo "QUERY ERROR: " . mysql_error() . "\n";
}

Dimava
Thu 23rd May '02, 7:51pm
i get this error:


QUERY ERROR: You have an error in your SQL syntax near 'group, description ) values ( 'test', 'dimava', '0', '1', 'testing' )' at line 1


thanks,

Dimava

scoutt
Thu 23rd May '02, 7:53pm
group is a reserved word in mysql. use something else that mysql doesn't use.