mysql_query 发送Select 语句

<?php
$serverLink=@mysql_connect("localhost","root","")or die("连接服务器失败!程序中断执行!");
mysql_query("set names 'gbk'");
$dbLink=@mysql_select_db("dedecmsv57") or die("选择当前数据库失败!程序中断执行!");
$selectSQL="select * from dede_flinktype";
$resultSet=mysql_query($selectSQL);
var_dump($resultSet);
echo "<br/>";
echo "student 表的记录数为:".mysql_num_rows($resultSet);
mysql_free_result($resultSet);
mysql_close($serverLink);

?>

posted @ 2015-12-14 11:28  清风翠竹茶飘香  阅读(448)  评论(0编辑  收藏  举报