Please sign in to comment.
allow reconnecting after failed connect.
If connecting fails, then set _conn = NULL so that other commands also fail with not connected error. Also, from mysql documentation: "If you call mysql_sqlstate() after mysql_real_connect() fails, mysql_sqlstate() might not return a useful value". We don't need to keep a connection object which has failed.
- Loading branch information...
Showing with 13 additions and 4 deletions.