<?php$con = mysql_connect("server.com","user","pswd");if (!$con) { die('Could not connect: ' . mysql_error());}mysql_select_db("db", $con);$result = mysql_query("select count(1) FROM table");$row = mysql_fetch_array($result);$total = $row[0];echo "Total rows: " . $total;mysql_close($con);?>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)