31.05.2016, 18:14
You need to use mysql_errno to check if the connection was successful.
As for the error #1040, I'm not sure if the connection is still active if you don't close the connection with mysql_close when shutting down the server.
Another interesting thing is this: http://stackoverflow.com/a/34176072
As for the error #1040, I'm not sure if the connection is still active if you don't close the connection with mysql_close when shutting down the server.
Another interesting thing is this: http://stackoverflow.com/a/34176072