最基本的连接,输出
$conn = mysql_connect('localhost', 'root', '');
//mysql_query("SET NAMES 'gbk'", $conn);
mysql_select_db('sim', $conn);
$strSQL = "select * from sim_stui_nfo";
$rs=mysql_query($strSQL);
if (($num=mysql_num_rows($rs))>0){
$row=mysql_fetch_array($rs);
echo $row["name"];
}
//mysql_query("SET NAMES 'gbk'", $conn);
mysql_select_db('sim', $conn);
$strSQL = "select * from sim_stui_nfo";
$rs=mysql_query($strSQL);
if (($num=mysql_num_rows($rs))>0){
$row=mysql_fetch_array($rs);
echo $row["name"];
}