accessing two databases within one script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a page where I need to access two different databases in mysql. After accessing the first database I used mysql_close($connection);
and then code to access the other database. The first database access works fine, the second gives me the following error message:


*Warning*: mysql_query(): Can't connect to local MySQL server through socket '/tmp/mysql.sock'

I've tried not using the mysql_close statement. But that option doesn't select the new database, it seems to stay connected to the previous one, despite my specifying a new database to access. Can I not access two databases within the same script?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux