|
Posted by Ben on 12/17/05 13:09
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;DATABASE=reserv";
$connect=odbc_connect($conn,'root','pw');
include('/inetpub/wwwroot/resphpaccess/adodb/adodb.inc.php');
$db = &ADONewConnection('mysql');
$db->Connect('localhost', '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
Navigation:
[Reply to this message]
|