本文介绍了AppServer中的查询错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在数据库查询中遇到问题。我的查询是: I have problem in database query. The query that I have is:SELECT DATE_FORMAT(LAST_DAY(NEWSP_MONTH),'%d') as Last, MIN(NPDAY) AS NPDA, ifnull(MAX(NPDAY),0)+01 AS NPDAY, np.NEWSP_RACKNO, np.NEWSP_MONTH, np.NEWSPID FROM newspaper AS np, newspaper_days AS npd WHERE np.NEWSPID = npd.NEWSPID AND np.NPID =$newspaper AND np.CITYID = $city AND np.NEWSP_MONTH = $monthYear 此查询在Wamp中成功执行,版本详细信息为: Apache版本:2.4.4 PHP版本:5.4.12 MySQL版本:5.6.12 但是在Apache服务器上的相同查询会返回此错误: 警告:mysql_num_rows():提供的参数不是 D:\AppServ \ www.harchives\app\archive\checkmonth.php 中有效的MySQL结果资源line 68 Apache服务器的版本详细信息如下: Apache版本:2.2.8 PHP版本:5.2.6 MySQL版本:5.0.51b 在上面有一个由上述查询组成的变量。 非常感谢帮助,谢谢。This query executes successfully in Wamp where version details are:Apache version: 2.4.4PHP version: 5.4.12MySQL version: 5.6.12But the same query, on an Apache server, returns this error:Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\AppServ\www\archives\app\archive\checkmonth.php on line 68The version details of the Apache server are:Apache version: 2.2.8PHP version: 5.2.6MySQL version: 5.0.51bOn there is a variable consisting of the above mentioned query.Help is greatly appreciated, thanks.推荐答案 此查询在Wamp中成功执行版本细节: Apache版本:2.4.4 PHP版本:5.4.12 MySQL版本:5.6.12 但是在Apache服务器上的相同查询会返回此错误: 警告:mysql_num_rows():提供的参数不是 D中的有效MySQL结果资源:\ AppServ \ www.harchives \ app \ archive\checkmonth.php 在线 68 Apache服务器的版本详细信息如下: Apache版本:2.2.8 PHP版本:5.2.6 MySQL版本:5.0.51b 在上面有一个由上述人组成的变量查询。 非常感谢帮助,谢谢。This query executes successfully in Wamp where version details are:Apache version: 2.4.4PHP version: 5.4.12MySQL version: 5.6.12But the same query, on an Apache server, returns this error:Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\AppServ\www\archives\app\archive\checkmonth.php on line 68The version details of the Apache server are:Apache version: 2.2.8PHP version: 5.2.6MySQL version: 5.0.51bOn there is a variable consisting of the above mentioned query.Help is greatly appreciated, thanks. 这篇关于AppServer中的查询错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-01 08:08