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 ! 4 3442
Bob Bedford said the following on 09/09/2005 08:04: 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 ?
What is the query?
--
Oli
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" <be******@notforspammershotmail.com> wrote in message
news:43**********************@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 !
Hello Kevin, thanks for the reply, Do you mean the query string is long, or the result set is? How long are we talking?
The query itself, it must return 2 results quite shorts.
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)?
No, as the query is ALWAYS the same and no changes are made on the database
(no new records, no changes at all).
There is no error, that's the strangest thing.
It's like the query wouldn't return any result, but when done again, then it
returns a result. The behaviour is quite random. It may work 5 times and
then not 2 times then work again once then not 6 times....
very strange.
Hello Oli,
thanks for reply,
"Oli Filth" <ca***@olifilth.co.uk> a écrit dans le message de news:
Dv***********@newsfe7-win.ntli.net... Bob Bedford said the following on 09/09/2005 08:04: 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 ?
What is the query?
it something like (select x,y,z from 3 tables, with 10 left and inner join)
union (same thing than first query)
It shouldn't change anything, since the real problem is that sometimes it
works and sometimes it doesn't.
Bob This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jim Hatfield |
last post by:
I'm using: "select min(objid) from table_name where objid > $objid"
to select the next row in a sequence where there may be gaps. It
works fine unless the where clause results in an empty set.
...
|
by: Phil Powell |
last post by:
The table already has a fulltext index and from there I can use the
MySQL fulltext search query to get results as well as the relevancy
score.
The problem I have is that MySQL has a default...
|
by: chuy08 |
last post by:
Basically I am using PHP 5.1.2 with Apache 2.0.5 on a FreeBSD 5.4 box
with Mysql 4.1.1 running.
I am attempting to write information to a Mysql table called Jabber. I
can connect successfully,...
|
by: Ivan Marsh |
last post by:
Hey Folks,
I'm having a heck of a time wrapping mind around AJAX.
Anyone know of a simple, straight-forward example for pulling a simple
query from mysql with PHP using AJAX?
As I...
|
by: paranic |
last post by:
Hi there
i suppose we have the following class
file database.php
class InSQL
{
function query($query, $link_identifier=null)
{
global $query_totals;
|
by: eholz1 |
last post by:
Hello Members,
I am setting up a photo website. I have decided to use PHP and MySQL.
I can load jpeg files into the table (medium blob, or even longtext)
and get the image(s) to display without...
|
by: harvey |
last post by:
How do I make PHP create a database for mysql please?
I can see how to make tables and I have read all the documents
I can find but I don't understand how to make the database itself.
All...
|
by: =?iso-8859-1?B?Sm/jbyBNb3JhaXM=?= |
last post by:
Hi there guys,
My doubt is related to PHP and MySQL usage, and it's related to check
if performed queries are performed with success, since we know that:
Each time we perform an sql query,...
|
by: bruno_guedesav |
last post by:
I've made a function to fetch all results as an array of result-
arrays. Getting the result arrays is easy, via mysql_fetch_array, and
function itself is quite simple, as follows:
function...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |