Re: error for mysql
| From: | Daniel Convissor | Date: | Wed, 11 Oct 2000 04:02:56 +0000 |
| Subject: | Re: error for mysql | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19499@lists.php.net to get a copy of this message | ||
The mysql_connect is described in the manual as:
int mysql_connect(string [hostname [:port] [:/path/to/socket] ] ,
string [username] , string [password] );
So, an integer is returned upon success. So, if the function fails to
connect, no integer would be returned... code that something like this:
if (!mysql_connect(...fill in arguments here...) {
error("couldn't connect");
}
Do the same with mysql_select() function.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
More than just answers. Solutions. (SM)
http://www.analysisandsolutions.com/
4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409