Hi,
I started with php and mysql and i discovered three methods for connecting
to a database:
$conn="DRIVER={ MySQL ODBC 3.51 DRIVER};SERVER= 10.0.0.181;DATA BASE=reserv";
$connect=odbc_c onnect($conn,'r oot','pw');
include('/inetpub/wwwroot/resphpaccess/adodb/adodb.inc.php') ;
$db = &ADONewConnecti on('mysql');
$db->Connect('local host', 'root', 'pw', 'reserv');
$link = mysql_connect(" localhost", "mysql_user ", "mysql_password ")
or die("Impossible de se connecter : " . mysql_error());
Which one is the best and why?
What are the pro/contras for each?
Thanks
Ben
I started with php and mysql and i discovered three methods for connecting
to a database:
$conn="DRIVER={ MySQL ODBC 3.51 DRIVER};SERVER= 10.0.0.181;DATA BASE=reserv";
$connect=odbc_c onnect($conn,'r oot','pw');
include('/inetpub/wwwroot/resphpaccess/adodb/adodb.inc.php') ;
$db = &ADONewConnecti on('mysql');
$db->Connect('local host', 'root', 'pw', 'reserv');
$link = mysql_connect(" localhost", "mysql_user ", "mysql_password ")
or die("Impossible de se connecter : " . mysql_error());
Which one is the best and why?
What are the pro/contras for each?
Thanks
Ben
Comment