php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37652 Bad Database Selected
Submitted: 2006-05-31 13:33 UTC Modified: 2006-05-31 13:42 UTC
From: gally07 at infonie dot fr Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.1.4 OS: Windows XP Pro
Private report: No CVE-ID: None
 [2006-05-31 13:33 UTC] gally07 at infonie dot fr
Description:
------------
Hi,

I've got 2 connections on a server MysQL but to two databases different in a same time, and the two connection want to execute herself on the same database.

The message is that's table "blabla" not exist on database 1, but the database selected with mysql_select_db() on the database 2.

I don't have any problem with php 5.1.2

Reproduce code:
---------------
<?php
$cnx1 = mysql_connect('localhost', 'haha', 'hoho');
$cnx2 = mysql_connect('localhost', 'haha', 'hoho');

mysql_select_db('db1', $cnx1);
mysql_select_db('db2', $cnx2);

mysql_query('SELECT * from TABLE1', $cnx2);

Expected result:
----------------
Table TABLE1 doesn't exist


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-31 13:42 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 20:01:27 2024 UTC