Modesto Lingerfelter
Modesto Lingerfelter

Reputation: 119

Is there a limit to SQL statements when done through a PHP script?

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

Answers (1)

ednincer
ednincer

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

Related Questions