...

View Full Version : Deleting Error



Dooq
01-11-2008, 04:27 PM
When I try to Delete a Row from the MySQL Database I got that error

SQL Statement :"DELETE FORM `books` WHERE bid=2"

query error:
1064
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 'WHERE bid=2' at line 1
File :
Line :

this MySQL code is work fine at PHPMyAdmin and I don't know why I had problem in my script :(


$DB->query( "DELETE FORM `books` WHERE bid={$bid}" );

arnyinc
01-11-2008, 04:40 PM
It's just a typo. You have "DELETE FORM". It should be "DELETE FROM".

Dooq
01-11-2008, 04:52 PM
Thanks :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum