Page 1 of 1

I give up! Delete won't work

Posted: Sat Mar 11, 2006 3:07 pm
by xterra
I've tried many variations of this simple syntax:

Code: Select all

$query="DELETE FROM `myTable` WHERE 'ID'='$myId' ";

$result=mysql_query($query);

That should work because all my SELECT statements are just like that except I use the work "Like" just because thats what I saw in tutorials



Code: Select all

$query="SELECT * FROM `myTable` WHERE 'ID' LIKE '$myId' ";

$result=mysql_query($query);
I don't get any errors, just no data is deleted from my database.

Any help is appreciated,
Rob.

Posted: Sat Mar 11, 2006 3:11 pm
by feyd
`ID` not 'ID'

` vs '

Posted: Sat Mar 11, 2006 3:11 pm
by hawleyjr
Do you have delete permissions?