mysqldump syntax error

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Traduim
Forum Newbie
Posts: 11
Joined: Tue Dec 10, 2002 4:21 am
Location: Catalunya

mysqldump syntax error

Post 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.
User avatar
Traduim
Forum Newbie
Posts: 11
Joined: Tue Dec 10, 2002 4:21 am
Location: Catalunya

Post 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.
Post Reply