RE: [PHP] mysql.sock file location
| From: | Donald Tyler | Date: | Thu, 25 Sep 2003 15:34:24 +0000 |
| Subject: | RE: [PHP] mysql.sock file location | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163927@lists.php.net to get a copy of this message | ||
I wasn't worried about short code =0P
I would have done this if I was:
$Connection = mysql_connect('localhost','******','******')
or die(mysql_error());
=0P
-----Original Message-----
From: Jay Blanchard [mailto:jay.blanchard@niicommunications.com]
Sent: Thursday, September 25, 2003 10:13 AM
To: Brad Pauly; Donald Tyler
Cc: php-general@lists.php.net
Subject: RE: [PHP] mysql.sock file location
[snip]
> Here's the test script I am using: (Presume that's what you meant by
> "connection string"?
>
> <?PHP
>
> if($Connection = mysql_connect('localhost', '******', '******'))
> print 'Success!';
> else
> print 'Failure';
>
> ?>
[/snip]
Let's get a hair more info, try
if(!($Connection = mysql_connect('localhost', '******',
'******'))){
print(mysql_error() . "\n");
exit();
}
It also has the added benefit of shortening the code