看看下面的例子
<php
$ip = getenv(
//echo
$conn=mysql_connect(
mysql_select_db(
$sql=
$result=mysql_query($sql
$num=mysql_num_rows($result)
$count=mysql_query(
$count=mysql_num_rows($count)
//echo
//echo
if($num==
{
$sum=
$count++;
$sql=
mysql_query($sql
mysql_close($conn)
//echo
}
else
{
$my=
$bbbbbb=mysql_query($my) or die(mysql_error())
$row=mysql_fetch_Array($bbbbbb)
@$sum=$row[sum];
//echo
$sum++;
$sql=
mysql_query($sql)
mysql_close($conn)
}
$str_count=strval($count)
$str_count=Chop($str_count)
$count_len=strlen($str_count)
[
From:http://tw.wingwit.com/Article/program/MySQL/201311/29753.html