Testing database connections |
Thanks for the tips guys. I tried to find a way to get $this->load->database(); to work but didn't have any luck. With display errors set to off and db_debug set to false, I was able to prevent the error page, but couldn't find a way to test the connection like I could with $mysqli->connect_error. Too bad. It would be more versatile and I could test the connection with other drivers if I could use a built in CI function.
Anyway, Silentium, I took your advice on closing the connection and good call on the else statements. I'm still learning. Thanks again guys! |
Messages In This Thread |
Testing database connections - by BenHeadrick - 03-30-2015, 10:24 PM
RE: Testing database connections - by CroNiX - 03-31-2015, 06:55 AM
RE: Testing database connections - by BenHeadrick - 03-31-2015, 04:04 PM
RE: Testing database connections - by CroNiX - 04-01-2015, 07:14 AM
RE: Testing database connections - by silentium - 04-01-2015, 10:26 AM
RE: Testing database connections - by BenHeadrick - 04-03-2015, 07:11 PM
|