I have a MySQL class that I use to connect to MySQL. But after doing the upgrade of PHP to 5.4.16, it doesn't work any more. Can anyone help with it?
Below is the code that I use. Whenever I try to connect it gets into the error part.
final class MySQL {
private $connection;
public function __construct($hostname, $username, $password, $database) {
if (!$this->connection = mysql_connect($hostname, $username, $password)) {
exit('Error: Could not make a database connection using ' . $username . '@' . $hostname);
}
}