RE: [PHP] Re: Efficient db connect function?

2003-02-23 Thread John W. Holmes
> As the previous post of using die would be better. Also try using > mysql_pconnect (for persistant connections) and also, if you are running > more than one query per script execution, then DON'T keeping trying to > connect/select database. Only use persistent connections if you really sure you

[PHP] Re: Efficient db connect function?

2003-02-23 Thread Bobby Patel
As the previous post of using die would be better. Also try using mysql_pconnect (for persistant connections) and also, if you are running more than one query per script execution, then DON'T keeping trying to connect/select database. I suggest you do the first two things at the start of ALL the s

[PHP] Re: Efficient db connect function?

2003-02-23 Thread Michiel van Heusden
$db = mysql_connect$db_host, $db_user, $db_pass) or die ("Cannot connect to database"); mysql_select_db("$db_name", $db) or die ("Cannot select database"); $result = mysql_query($query ,$db) or die ("Query not executed"); and all the outputting code... grace michiel "Cf High" <[EM