peasepud
Programmer
- Jul 20, 2007
- 35
Hi,
Im trying to delete records from two tables but am hitting a #1064 error but Im totally lost as to whats wrong!
DELETE FROM tbl_topics, tbl_posts WHERE tbl_topics.posts = 0 AND tbl_topics.tid = tbl_posts.topic_id
So basically Im joining table 1 and table 2 on one field but only removing those that have a zero in the posts field of table 1.
Any ideas would be greatly appreciated.
Im trying to delete records from two tables but am hitting a #1064 error but Im totally lost as to whats wrong!
DELETE FROM tbl_topics, tbl_posts WHERE tbl_topics.posts = 0 AND tbl_topics.tid = tbl_posts.topic_id
So basically Im joining table 1 and table 2 on one field but only removing those that have a zero in the posts field of table 1.
Any ideas would be greatly appreciated.