clearstatcache Posted August 3, 2007 Share Posted August 3, 2007 i have a program that will transfer file and every file transferred is recorded in the database....b4 saving into the database i want to check if my database connection doesn't fail....or if in case there's an error, the file transfer will be stop until the connection is back... im using pear DB_DATAOBJECT.... Link to comment https://forums.phpfreaks.com/topic/63135-helpdetecting-no-database-connection-in-mysql/ Share on other sites More sharing options...
Illusion Posted August 3, 2007 Share Posted August 3, 2007 mysql_select_db('my_database') or die('Could not select database'); before running the query if u r using PHP with MySQL. Link to comment https://forums.phpfreaks.com/topic/63135-helpdetecting-no-database-connection-in-mysql/#findComment-314862 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.