代码如下 | 复制代码 |
$db=mysql_connect("localhost","root","qwaszx"); $query="select * from num"; $result=mysql_db_query("test",$query); if($result){ $r=mysql_fetch_array($result); $query='update num set NumValue='.$counter.' where id=1'; $result=mysql_db_query("test",$query); mysql_close(); |