sql文在MySql-Front里执行正常,但是放在php里执行就不行了,求真相,在线等!
SELECTIFNULL(whpj.xianchaomaichujia_bank,'0')AScm,IFNULL(jishu.xianzaizuidazhi,'0')AS...
SELECT IFNULL(whpj.xianchaomaichujia_bank,'0') AS cm, IFNULL(jishu.xianzaizuidazhi,'0') AS max FROM jishu LEFT JOIN whpj ON jishu.bankid=whpj.bank_id and whpj.bizhong=jishu.bizhongid and whpj.xianzaizuidazhi = jishu.xianzaizuidazhi
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in admin.php. 展开
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in admin.php. 展开
1个回答
2014-01-26
展开全部
把执行这句sql那加个输出,看看到底报什么错,如:
sql = "SELECT ...........";
$result = mysql_query( $sql ) or die( mysql_error );
sql = "SELECT ...........";
$result = mysql_query( $sql ) or die( mysql_error );
追问
near '\'0\') AS cm, IFNULL(jishu.xianzaizuidazhi,\'0\') AS max FROM jishu LEFT' at line 2
谢谢解决了,double型的数据不该用'0',应该用0。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询