Connecting database to both mysqli and mysql entension

1 · Subin Siby · June 8, 2013, 7:26 a.m.
You can use both mysql and mysqli extension for executing SQL queries. Here is a tutorial on how to connect both the extensions to a database. Create a file named config.php where you will connect to the database. Put the following code in it: localhost", "username", "password", "db"); if ($mysqli-connect_errno) {     echo "Failed to connect to MySQL: (" . $mysqli-connect_errno . ") " . $mysqli-connect_error; } $bd = mysql_connect("localhost", "username", "...