时间:2021-07-01 10:21:17 帮助过:2人阅读
/* $sql1=$result = SELECT `a1` FROM `tab` WHERE 1; $sql2=$result = SELECT `a3` FROM `tab` WHERE 1; $result1=mysql_query($sql1," $con"); $result2=mysql_query($sql2," $con"); $con1=mysql_fetch_array($result 1); $con2=mysql_fetch_array($result 2); echo $con1["con"]/$con2["con"]; */ //太佩服你了,上面这段代码每一行都有错误!! $sql1 = 'SELECT `a1` FROM `tab` WHERE 1'; $sql2 = 'SELECT `a3` FROM `tab` WHERE 1'; $result1=mysql_query($sql1,$con); $result2=mysql_query($sql2,$con); $con1=mysql_fetch_array($result1); $con2=mysql_fetch_array($result2); echo $con1['a1'] / $con2['a3'];