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
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