Hello All,
I am having a select query that is combination of 7 select query joined by union. It is dealing with large amount of data .
Here is basic syntax of my query.
select fieldId1,fieldId2 from table1 where....
union
select fieldId1,fieldId2 from table1 where...
union
select fieldId1,fieldId2 from table1 where...
So when I am running that script many times the script execution get stopped due to mysql server gone away error. I tried to reconnect the connection by pinging mysql server like this..
if(!mysql_ping($connect))
{
mysql_connect('host','user','pass');
mysql_select_db('db_name');
}
then also i am getting the same error. So is there any way so that I can resolve this error programatically? Please help me. Thanks in advance.