468,134 Members | 1,301 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,134 developers. It's quick & easy.

delete statement not working

tolkienarda
316 100+
hi all
i have a loop that decides if a row should be deleted. i know i am getting into my if statement and that the variable that stores the id is correct but the delete statement wont work can someone look and see what dumb mistake i made

[PHP]
$a=mysql_query("DELETE FROM 'calendar' WHERE 'id'='$row2[0]'");
[/PHP]

i know that $row2[0] = the id cause i have an echo statement under that but for some reason my stuff never gets deleted from the database

eric
Mar 14 '07 #1
3 949
tolkienarda
316 100+
hi all
i have a loop that decides if a row should be deleted. i know i am getting into my if statement and that the variable that stores the id is correct but the delete statement wont work can someone look and see what dumb mistake i made

[PHP]
$a=mysql_query("DELETE FROM 'calendar' WHERE 'id'='$row2[0]'");
[/PHP]

i know that $row2[0] = the id cause i have an echo statement under that but for some reason my stuff never gets deleted from the database

eric

my bad i needed to take the quotes out around calendar
Mar 14 '07 #2
Atli
5,058 Expert 4TB
You don't need the quotes around the id column either.
Mar 14 '07 #3
tolkienarda
316 100+
ok thanks

eric
Mar 14 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

20 posts views Thread by de Beers | last post: by
14 posts views Thread by php newbie | last post: by
16 posts views Thread by Philip Boonzaaier | last post: by
16 posts views Thread by robert | last post: by
reply views Thread by Roald | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.