note 109668 added to function.mysql-connect
| From: | trevatdedicatedotcodotuk | Date: | Tue, 07 Aug 2012 16:42:03 +0000 |
| Subject: | note 109668 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189947@lists.php.net to get a copy of this message | ||
A little note if your scripts sleep a lot, you want to run exactly the same SQL statement 2+ times
and you have the "MySQL has gone away" error a lot.
Try setting the 4th parameter to TRUE as it seems sometimes PHP doesn't spot that resource ID x
which it used for the last identical lookup is now dud and so tries to use it, thus bypassing tests
such as is_resource() and causing a failure.
This is for when mysql_ping() doesn't work for your situation of course.
----
Server IP: 87.124.126.49
Probable Submitter: 82.69.36.150
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
Edit -- https://master.php.net/note/edit/109668
Del: integrated -- https://master.php.net/note/delete/109668/integrated
Del: useless -- https://master.php.net/note/delete/109668/useless
Del: bad code -- https://master.php.net/note/delete/109668/bad+code
Del: spam -- https://master.php.net/note/delete/109668/spam
Del: non-english -- https://master.php.net/note/delete/109668/non-english
Del: in docs -- https://master.php.net/note/delete/109668/in+docs
Del: other reasons-- https://master.php.net/note/delete/109668
Reject -- https://master.php.net/note/reject/109668
Search -- https://master.php.net/manage/user-notes.php