I see a lot more people doing the !$connect way of making sure connection happens instead of doing the "or" like I learned way back when.
In fact, I can't even find a php tutorial page for more uses on the OR option. Is there one?
So, with that, there'd be no way to do:
PHP Code:
$connection=mysql_connect ("xxx.xx.xx.xxx", "user", "pw") or mysql_connect ("xxx.xx.xx.xx2", "user", "pw");
//or get even crazier
$connection=mysql_connect ("xxx.xx.xx.xxx", "user", "pw") or mysql_connect ("xxx.xx.xx.xx2", "user", "pw") or die(mysql_error());
Trying to limit lines of code is all.
Cheers!
Ryan
Bookmarks