链接数据库;
$link= mysql_connect("hostname","user","password");
选择数据库;
mysql_select_db('db_name');
执行sql语句;
mysql_query(sql语句);
关闭链接;
mysql_close($link);
链接数据库;
$link= mysql_connect("hostname","user","password");
选择数据库;
mysql_select_db('db_name');
执行sql语句;
mysql_query(sql语句);
关闭链接;
mysql_close($link);
转载于:https://www.cnblogs.com/webhotel/archive/2010/09/17/1829007.html