Jump to content

Lost connection to MySQL server during query error


kevinkhan

Recommended Posts

Hi guys..

 

I have two database, one has 17000 numbers and the other one has only 3 numbers..

 

When i run the script below using the database with 17000 numbers i get this error "Lost connection to MySQL server during query"

 

and when i run the script with the the database that has only 3 numbers in it.. the script works perfect...

 

	$config['dbhost'] = 'hostname';
$config['dbuser'] = 'kevin';
$config['dbpass'] = 'password';
$config['dbname'] = 'database with 1700 numbers';


//$config['dbhost'] = 'mysql359int.cp.blacknight.com';
//$config['dbuser'] = 'u1001236_test';
//$config['dbpass'] = 'password';
//$config['dbname'] = 'db1001236_testing';

set_time_limit(0);

ini_set('error_reporting', E_ALL);

 error_reporting(E_ERROR | E_WARNING | E_PARSE);

//define the base path for the files
$maindir = dirname(__FILE__) . DIRECTORY_SEPARATOR;


//connect to the databse server and select database.
@mysql_connect($config['dbhost'], $config['dbuser'], $config['dbpass']) or die(mysql_error());
@mysql_select_db($config['dbname']) or die(mysql_error());


$sql = "SELECT * FROM `phone_number` WHERE `phone` NOT IN (SELECT `phone` FROM `phone_number_sent`)";
$rea = @mysql_query($sql) or die(mysql_error());

//define phone list array
$phone_list = array();
  // rsa = record set array
while ($rsa=mysql_fetch_array($rea)) {

	echo $rsa['phone']."<br />";
	//$phone_list[] = array($rsa['phone'], $rsa['source']);
}

 

Does any body know what the problem might be?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.