In my database connection sequence, I have the following lines:
$db = mysql_connect("localhost", "username", "password") or die ($db_die_msg);
mysql_select_db($database_local);
if (!$db) {
echo "Unable to connect to database! Please <a href=\"mailto:webmaster@carepartnership.org\">notify system administrator</a> of this incident.";
exit;
}
(the $db_die_msg is defined elsewhere)
Seems like the second die message ("if (!$db)...") is unnecessary, since the "or die" in the connection string will catch any problems first. True, or should I have both for some reason?
Thanks,
Bob