Page 1 of 1

mysqldump syntax error

Posted: Wed Dec 11, 2002 11:36 am
by Traduim
I need to run this mysqldump:

Code: Select all

passthru("mysqldump --add-drop-table -hlocal -ume -pmypass database table --where=id_fitxa IN ($llista)|mysql -haway -usomeone -psomepass database");
The problem is the syntax is just not correct.

If is use --where=id_fitxa<100 instead of --where=id_fitxa IN ($llista), the code works fine.

Anyway, I don't want to dump records with id_fitxa below 100, but records with id_fitxa contained in $llista.

Posted: Thu Dec 12, 2002 11:00 am
by Traduim
Actually, there was no syntax error. The problem was the excesive length of the passthru() line. I have solved the problem by converting th mysqldump to proper SQL syntax.