Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error with Delete statement

Status
Not open for further replies.

wapboy

Technical User
Oct 26, 2002
13
0
0
GB
I am fairly new to MySQL - I am trying to delete some records from two tables on my forum using:-

DELETE FROM phpbb_search_wordmatch, phpbb_search_wordlist USING phpbb_search_wordmatch, phpbb_search_wordlist WHERE phpbb_search_wordmatch.word_id = phpbb_search_wordlist.word_id AND ( length(phpbb_search_wordlist.word_text) < 3 OR length(phpbb_search_wordlist.word_text) > 20);

I get the following error:-

MySQL said:


#1064 - You have an error in your SQL syntax near '
phpbb_search_wordlist USING phpbb_search_wordmatch,
phpbb_search_wordlist WHERE' at line 1


Checked the syntax and can't see what is wrong, although not sure about USING? Anyway can anyone show me what I'm doing wrong.

Thanks

Paul
 
It seems to be barfing at the place where the second table is mentioned in the delete.

Multitable deletes are available beginning with MySQL 4.0.0. Just to ask the dumb question, are you running MySQL 4.0.0 or higher?


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Hi According to Webair it is version 4

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top