以下是代码片段:
<?php
$sql="select * from checklist where game_id=$gid and task='$task' and status='$status'";
$result=mysql_query($sql);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
if (!mysql_num_rows($result))
{
echo "record doesn't exist~~~~~!!!!!!";
}
else
{
// echo mysql_num_rows($result)."\n";
echo $row['game_id'];
echo $row['task'];
}
?>