note 105799 deleted from function.mysql-connect by danbrown
| From: | danbrown@php.net | Date: | Sat, 17 Sep 2011 01:01:33 +0000 |
| Subject: | note 105799 deleted from function.mysql-connect by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-183230@lists.php.net to get a copy of this message | ||
Note Submitter: jokeke at btinternet dot com
----
I'm a huge fan of the '!' symbol however when connecting to a SQL server i prefer
using a comparison operator as demo'd below...
<?php
$link_id = mysql_connect();
if($link_id < ' ') {
die('Could not connect to MySQL Server: '.mysql_error()); }
echo 'Connected to MySQL Server';
?>
too lazy to explain, but reverse the comparion operator for a full explanation... :)