You are here: Re: same mysql query doesn't always return a result « PHP Programming Language « IT news, forums, messages
Re: same mysql query doesn't always return a result

Posted by Kevin on 09/09/05 18:36

Do you mean the query string is long, or the result set is? How long are we
talking?

Some things to try:

Right after executing the query if you don't get a result, do an "echo
mysql_error();" This will tell you if there was an error message.

Check MySQL's "max_allowed_packet" variable. This can cause problems with
long queries (although you should get an error).

Is it possible that the result of your query really is empty (i.e., the
WHERE or HAVING clauses aren't satisfied)?

- Kevin

"Bob Bedford" <bedford1@notforspammershotmail.com> wrote in message
news:432133e9$0$1161$5402220f@news.sunrise.ch...
> We have no access to a mysql NG on my provider's server, so we ask here:
>
> We have a long query (long in text) with a UNION between 2 select.
>
> We have been informed that some times the query doesn't return any result.
> We have tried on our server and we always get a result. BUT, trying on the
> hosting server, many times the query doesn't return any result and doesn't
> get any error.
>
> Any idea ? does Union have any problem ? how to check if the query failed
> ?
> My hoster said that sometimes the table can be locked (if the server is
> overloaded) and then mysql doesn't return any result, but this seems to me
> an aberration.
>
> the query takes about 0.0050 sec to execute when it doesn't return any
> result, and 0.030 when I get results
>
> Please help !
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация