php 5和mysql失败 [英] php 5 and mysql failure

查看:58
本文介绍了php 5和mysql失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个php脚本,它对其他三个
服务器执行三个xml查询以检索一组id并在我对mysql进行查询之后

那种

SELECT * FROM表WHERE id IN('''id'');

虽然我确定与数据库的连接没问题,我有时会因为b $ b得到这样的错误:

*警告*:mysql_fetch_object():提供的参数不是有效的

MySQL结果资源in ...

每次运行脚本时都不会发生这种情况,有时只会发生。

如果我回应查询,请复制并粘贴phpmyadmin,或者如果我执行

相同的查询在一个脚本中只执行查询而没有其余的它

工作!

解决这个问题后我注意到它通常

失败了我有一大堆id(来自多个服务器的肯定响应)。

这意味着脚本使用了更大的内存,可能是

mo重新资源,但我没有得到内存不足错误,我得到了之前描述的



我的问题是,是否存在任何限制某处在php5或

mysql(第5版)?

感谢您的帮助,


YEHUDI GARRETT

I''m using a php script which performs three xml queries to other three
servers to retrieve a set of ids and after I do a query to mysql of
the kind
SELECT * FROM table WHERE id IN (''set of ids'');
Although I''m sure the connection to the database is ok, I sometimes
get an error of this kind:
*Warning*: mysql_fetch_object(): supplied argument is not a valid
MySQL result resource in ...
This does not happen every time i run the script, only sometimes.
If I echo the query, copy and paste in phpmyadmin, or if I perform the
same query in a script that does only the query without the rest it
works!
After troubleshooting this issue I noticed that it usually failed when
I had a big set of ids (positive response from more than one server).
This means that the script used a bigger amount of memory and probably
more resources, but I did not get an "out of memory error", I got the
one described before.
My question is, is there any kind of limit somewhere in php5 or in
mysql (version 5)?
Thanks for help,

YEHUDI GARRETT

推荐答案

Caffeneide schreef:
Caffeneide schreef:

我正在使用php脚本对其他人执行三个xml查询三个
服务器检索一组id并在我查询到mysql之后

那种

SELECT * FROM表WHERE id IN ('''id'');

虽然我确定与数据库的连接没问题,但我有时会发现这样的错误:
*警告*:mysql_fetch_object():提供的参数不是有效的

MySQL结果资源...

每次都不会发生这种情况我有时只运行脚本。

如果我回应查询,co在phpmyadmin中py和粘贴,或者如果我在一个只执行查询的脚本中执行

相同的查询而没有其余的它

有效!

在对此问题进行故障排除后,我注意到它通常会失败时

我有一大堆ID(来自多个服务器的肯定响应)。

这意味着脚本使用了更多的内存,可能还有更多的资源,但我没有得到内存不足错误,我得到了之前描述的

。 />
我的问题是,在php5或

mysql(版本5)中是否有任何限制?

感谢您的帮助,


YEHUDI GARRETT
I''m using a php script which performs three xml queries to other three
servers to retrieve a set of ids and after I do a query to mysql of
the kind
SELECT * FROM table WHERE id IN (''set of ids'');
Although I''m sure the connection to the database is ok, I sometimes
get an error of this kind:
*Warning*: mysql_fetch_object(): supplied argument is not a valid
MySQL result resource in ...
This does not happen every time i run the script, only sometimes.
If I echo the query, copy and paste in phpmyadmin, or if I perform the
same query in a script that does only the query without the rest it
works!
After troubleshooting this issue I noticed that it usually failed when
I had a big set of ids (positive response from more than one server).
This means that the script used a bigger amount of memory and probably
more resources, but I did not get an "out of memory error", I got the
one described before.
My question is, is there any kind of limit somewhere in php5 or in
mysql (version 5)?
Thanks for help,

YEHUDI GARRETT



是的,有..
http://tinyurl.com/3jgwjn


但是,多少(或多少?)id'确实得到了最大的回报?

也许你必须重写你的解决方案以获得一个工作...


-

Luuk

yes, there is..
http://tinyurl.com/3jgwjn

but, how many (or how much?) id''s do get returned at max?
maybe you have to rewrite your solution to get a working one..

--
Luuk


Caffeneide写道:
Caffeneide wrote:

我'我正在使用一个php脚本,它对其他三个
服务器执行三个xml查询,以检索一组id,并在我查询到mysql的

之后/>
SELECT * FROM表WHERE id IN(''id''');

虽然我确定与数据库的连接没问题,但我有时会
得到这种错误:

*警告*:mysql_fetch_object():提供的参数不是有效的

MySQL结果资源...

每次运行脚本时都不会发生这种情况,有时只会发生。

如果我回显查询,请复制并粘贴phpmyadmin,或者如果我执行

相同的查询在一个脚本中只执行查询而没有其余的它

工作!

解决此问题后我注意到它通常在

我有一大堆ID(积极响应f rom多个服务器)。

这意味着脚本使用了更多的内存,可能还有更多的资源,但我没有得到内存不足错误,我得到了之前描述的



我的问题是,在php5或

mysql中是否存在任何限制(第5版)?

感谢您的帮助,


YEHUDI GARRETT
I''m using a php script which performs three xml queries to other three
servers to retrieve a set of ids and after I do a query to mysql of
the kind
SELECT * FROM table WHERE id IN (''set of ids'');
Although I''m sure the connection to the database is ok, I sometimes
get an error of this kind:
*Warning*: mysql_fetch_object(): supplied argument is not a valid
MySQL result resource in ...
This does not happen every time i run the script, only sometimes.
If I echo the query, copy and paste in phpmyadmin, or if I perform the
same query in a script that does only the query without the rest it
works!
After troubleshooting this issue I noticed that it usually failed when
I had a big set of ids (positive response from more than one server).
This means that the script used a bigger amount of memory and probably
more resources, but I did not get an "out of memory error", I got the
one described before.
My question is, is there any kind of limit somewhere in php5 or in
mysql (version 5)?
Thanks for help,

YEHUDI GARRETT



它''可能你遇到了限制,但它非常大。


提供的参数不是有效的MySQL结果资源。表示

你的mysql_query()可能返回false。您应该始终检查

mysql_query()的结果,如果失败,请记录错误(你真的

不想向用户显示这些错误, 你呢?)。或者,在

开发系统上显示错误。


-

========= =========

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================

It''s possible you''re running into a limit, but it''s quite large.

The "supplied argument is not a valid MySQL result resource" indicates
your mysql_query() returned false, probably. You should ALWAYS check
the result of mysql_query(), and if it fails, log the error (you really
don''t want to display those errors to your users, do you?). Or, on a
development system, display the error.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


4月30日下午5:38,Jerry Stuckle< jstuck ... @ attglobal.netwrote:
On Apr 30, 5:38 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:

Caffeneide写道:
Caffeneide wrote:

我正在使用一个php脚本,它对其他三个

服务器执行三个xml查询以检索一组ids和我查询到

的mysql之后的那种

SELECT * FROM表WHERE id IN(''set of ids'');

虽然我确定与数据库的连接是正常的,但我有时会发生这样的错误:

*警告*:mysql_fetch_object():提供的参数不是有效的

MySQL结果资源...

每次运行脚本时都不会发生这种情况,有时只会发生。

如果我回复查询,复制并粘贴在phpmyadmin中,或者如果我在一个只执行查询的脚本中执行

相同的查询而没有其余的它

工作!

在解决了这个问题后,我注意到它通常都失败了

我有一大堆id(来自多个服务器的肯定响应)。

这意味着脚本使用了更多的内存,可能还有更多的资源,但我没有得到内存不足错误,我得到了

一个之前描述过。

我的问题是,在php5或者

mysql(版本5)中是否有任何限制?

谢谢你帮助,
I''m using a php script which performs three xml queries to other three
servers to retrieve a set of ids and after I do a query to mysql of
the kind
SELECT * FROM table WHERE id IN (''set of ids'');
Although I''m sure the connection to the database is ok, I sometimes
get an error of this kind:
*Warning*: mysql_fetch_object(): supplied argument is not a valid
MySQL result resource in ...
This does not happen every time i run the script, only sometimes.
If I echo the query, copy and paste in phpmyadmin, or if I perform the
same query in a script that does only the query without the rest it
works!
After troubleshooting this issue I noticed that it usually failed when
I had a big set of ids (positive response from more than one server).
This means that the script used a bigger amount of memory and probably
more resources, but I did not get an "out of memory error", I got the
one described before.
My question is, is there any kind of limit somewhere in php5 or in
mysql (version 5)?
Thanks for help,


YEHUDI GARRETT
YEHUDI GARRETT



你可能正在运行进入限制,但它非常大。


提供的参数不是有效的MySQL结果资源。表示

你的mysql_query()可能返回false。您应该始终检查

mysql_query()的结果,如果失败,请记录错误(你真的

不想向用户显示这些错误, 你呢?)。或者,在

开发系统上显示错误。


-

========= =========

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司

jstuck ... @ attglobal.net

==================


It''s possible you''re running into a limit, but it''s quite large.

The "supplied argument is not a valid MySQL result resource" indicates
your mysql_query() returned false, probably. You should ALWAYS check
the result of mysql_query(), and if it fails, log the error (you really
don''t want to display those errors to your users, do you?). Or, on a
development system, display the error.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================



谢谢。查询是正确的,因为有时我只得到这个

错误...但是我得到这个错误的方式似乎完全是

随机...的数量我返回的ids变化很大,但是有些(一两三)数百只是b $ b

thanks. the query is correct because only sometimes I got this
error...but the way on which I got this error seems to be completely
random...the number of ids I returned is quite variable but it''s
around some (one-two-three) hundreds


这篇关于php 5和mysql失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆