Connection lost suddenly
| From: | Glenn Miller | Date: | Tue, 22 Aug 2000 18:16:09 +0000 |
| Subject: | Connection lost suddenly | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-2273@lists.php.net to get a copy of this message | ||
Hi guys.
I've finally been able to know what the error is... The connection
with the
database seems to suddenly break, I've tried both pconnect and connect,
but I really do not know how to solve it.
Any suggestions ?
<html>
<body>
<?php
$db = mysql_pconnect("localhost","root","admin");
echo mysql_error($db);
mysql_select_db("db_prueba",$db);
echo mysql_error($db);
$result = mysql_query("SELECT * FROM usuarios",$db);
echo mysql_error($db);
printf("First Name: %s<br>\n", mysql_result($result,0,"login"));
echo mysql_error($db);
?>
</body>
</html>
--- El mensaje de error es el siguiente
Warning: Supplied argument is not a valid MySQL result resource in
/export/home2/homepage/docs/prueba_db.php4 on line 11
First Name:
Lost connection to MySQL server during query