note 97657 added to function.mysql-connect
| From: | tpl99 at yandex dot ru | Date: | Fri, 30 Apr 2010 20:56:14 +0000 |
| Subject: | note 97657 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168827@lists.php.net to get a copy of this message | ||
Whenever you open two connections to a single database,
you are likely not to get any error when selecting not existing db.
<?php
$db1 = mysql_connect( ... );
mysql_select_db('existing_db',$db1);
$db2 = mysql_connect( ... );
mysql_select_db('not_existing_db', $db2);
mysql_query(... , $db2);
//will return no errors and the query wouldn't be executed.
?>
Pay attention and you may save few hours of debugging.
----
Server IP: 69.147.83.197
Probable Submitter: 109.65.10.117
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
Edit -- https://master.php.net/note/edit/97657
Del: integrated -- https://master.php.net/note/delete/97657/integrated
Del: useless -- https://master.php.net/note/delete/97657/useless
Del: bad code -- https://master.php.net/note/delete/97657/bad+code
Del: spam -- https://master.php.net/note/delete/97657/spam
Del: non-english -- https://master.php.net/note/delete/97657/non-english
Del: in docs -- https://master.php.net/note/delete/97657/in+docs
Del: other reasons-- https://master.php.net/note/delete/97657
Reject -- https://master.php.net/note/reject/97657
Search -- https://master.php.net/manage/user-notes.php