Reputation: 119
I have an SQL query that consists of lots of SQL statements separated by semicolons. When I run the query through phpmyadmin it works fine. However when I do it through a PHP script, I get a message saying there is an error in my SQL syntax? Is there a limit to the length of the query when done through PHP?
Upvotes: 1
Views: 102
Reputation: 951
There's a limit in MySQL configuration: max_allowed_packet in my.cnf file.
Try to set a bigger packet size.
Upvotes: 1