I am using PHP and MySQL. In my program there is a select query involving joins. When I run it on localhost it\'s working fine but when I upload it on my server and try to e
If you are using PDO driver, set the PDO::MYSQL_ATTR_INIT_COMMAND in your driver_options array when constructing a new database handle
PDO::MYSQL_ATTR_INIT_COMMAND
like so:
$dbh = new PDO('mysql:host=xxx;port=xxx;dbname=xxx', 'xxx', 'xxx', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET SESSION SQL_BIG_SELECTS=1'));