php查詢(xún)mysql語(yǔ)句,用dw寫(xiě)的php怎么連接mysql?
PHP頁(yè)面要寫(xiě)連接語(yǔ)句啊
$con=mysql_connect("localhost","username","password")ordie('數(shù)據(jù)庫(kù)連接錯(cuò)誤');
mysql_query("setnamesutf8",$con);
mysql_select_db("my_db",$con);
//以上就是連接
//執(zhí)行查詢(xún)$query=mysql_query('yourquery here');