You are here: Re: Creating Multiple Connection to MySQL Database « All PHP « IT news, forums, messages
Re: Creating Multiple Connection to MySQL Database

Posted by Fairul Izham on 08/08/06 06:38

"Fairul Izham" <fairul@tmnet.com.my> wrote in message
news:44d0c487$1_1@news.tm.net.my...
>
> "Erwin Moller"
> <since_humans_read_this_I_am_spammed_too_much@spamyourself.com> wrote in
> message news:44d0b41a$0$4531$e4fe514c@news.xs4all.nl...
>> Fairul Izham wrote:
>>
>>> Hi experts,
>>>
>>> Need some opinion,
>>>
>>> in my script, I create 3 database connection looks like this
>>>
>>> $db[1] = mysql_connect($server2, $username2, $password2, TRUE) or
>>> die("Server ".$server2." not found");
>>> mysql_select_db($database2,$db[1]) or die("Database ".$database2." not
>>> found");
>>>
>>> $db[2] = mysql_connect($server3, $username3, $password3, TRUE) or
>>> die("Server ".$server3." not found");
>>> mysql_select_db($database3,$db[2]) or die("Database ".$database3." not
>>> found");
>>>
>>> $db[3] = mysql_connect($server4, $username4, $password4, TRUE) or
>>> die("Server ".$server4." not found");
>>> mysql_select_db($database4,$db[3]) or die("Database ".$database4." not
>>> found");
>>>
>>> it is nicely deployed on busy webserver?
>>
>> Hi,
>>
>> What is your question?
>>
>> If you are wondering if making 3 connections is a problem: No.
>> Be sure you mention which connection each time you use one, because PHP
>> will
>> use the last one if you ommit the connectionparameter. A nice source of
>> potential bugs. :-)
>>
>> Regards,
>> Erwin Moller
>
> humm...
>
> mysql_connect ( [string server [, string username [, string password [,
> bool new_link [, int client_flags]]]]] )
>
> is it the connection parameter you mean is "bool new_link" ?
> what i'm wondering is, if webserver open to many connection to mysql
> database, it will degrade the mysql database performance. I also think is
> it possible the mysql server will return error "to many connection" to
> webserver. when i try the code on my pc it's seems okey, but what happen
> when I use it on busy server. is there any possible issue will come out?
>

anyone? does anyone have any opinion?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация