3 ms·
This flags a design flaw, perhaps in mysql_connect. If a warning is trivial enough that it's reasonable to silence, it shouldn't exist. Otherwise, it's not reas
by pekk 14y ago
This flags a design flaw, perhaps in mysql_connect. If a warning is trivial enough that it's reasonable to silence, it shouldn't exist. Otherwise, it's not reasonable to silence it!
I find it hard to believe that this is actually considered acceptable.
- jiggy2011 14y agoSurely that depends on your application, in 99.9% of cases where you are using LAMP to host some site a failed mysql_connect is probably an epic fail condition. My point is rather that there may certainly be applications where this is not the case. This is an area where exceptions are better than dumb warnings.
- jtreminio 14y agoDon't use mysql_*. Says so right in the docs. PDO can be used with try/catch.
- justinator 14y agoEpic? http://semi-rad.com/2013/01/everything-is-epic/ http://semi-rad.com/2013/01/everything-is-epic/
- astrodust 14y agoUsing mysql_query is an epic fail condition. Period.