note 74699 deleted from ref.mssql by danbrown

From: Date: Mon, 18 May 2009 02:07:43 +0000
Subject: note 74699 deleted from ref.mssql by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155622@lists.php.net to get a copy of this message
Note Submitter: vbchris at gmail dot com ---- My previous post although seemed to solve the problem of the connection randomly refusing to connect, it didn't. This however did. I created a loop to create a few connections and noticed it was always the first connection that failed. So I wrote this to keep trying to connect until it eventually does. <?php while(!$connection){ @$connection = mssql_connect($cfg['server'],$cfg['username'],$cfg['password']); } $db = mssql_select_db($cfg['database'],$connection) or die("Error selecting the database"); ?>

« previous php.notes (#155622) next »