![]() |
Mysql resources in array?
Isn't it possible to store multiple mysql connections to different databases in an array? So far i'm able to store them, but it is the same resource in both entries..
My print_r dump looks like this: Code:
ArrayPHP Code:
|
Well, that's because you don't pass the fourth parameter to the mysql_connect function as true (it's false by default). Add it and then you'll have different connections.
The definition of the mysql_connect function: Code:
resource mysql_connect ([ string $server [, string $username [, string $password [, bool $new_link [, int $client_flags ]]]]] ) |
Thanks a lot, it did the trick :)
|
| All times are GMT. The time now is 05:23 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0