PHP connection Mysql,oracle,mssql Database Connection code
PHP Tutorial Connection MySQL tutorial, oracle,mssql database Tutorial Connection code
Mssql
$server = ' HBDS3 ';
$username = ' username ';
$password = ' pwd ';
$database = ' database ';
$conn =mssql_connect ($server, $username, $password)
Or Die ("couldn-t connect to SQL Server on $server");
$db =mssql_select_db ($database) or Die ("couldn ' t Open database $database");
Oracle
$conn = Oci_connect ("DatabaseName", "passwd", "Sid");
if (! $conn) {
$e = Oci_error ();
Trigger_error (Htmlentities ($e [' message '], ent_quotes), e_user_error);
}
Mysql
$conn =mysql_connect ("localhost", "root", "admin") or Die ("Database Server connection Error". Mysql_error ());
mysql_select_db ("admin", $conn) or Die ("Database access Error". Mysql_error ());
mysql_query ("Set names gb2312");
http://www.bkjia.com/PHPjc/630843.html www.bkjia.com true http://www.bkjia.com/PHPjc/630843.html techarticle PHP Connection mysql,oracle,mssql database Connection code PHP tutorial Connection mysql tutorial, oracle,mssql database Tutorial Connection code//mssql $server = ' HBDS3 '; $username = ' Username '; $password = ' pwd '; $...