Hello SQL folks,

I got a STRANGE error, which I cannot explain.

When my web-server is doing the query

SELECT COUNT(rider_id) FROM participants WHERE race_id=305 AND group_id IN 
(SELECT id FROM groups WHERE timing=1)

I get an unkown MySQL error (code 2000).

But if I do the same query from a mysql client, it works. Both the mysql 
client and the web-server connects to the same sql server using the same 
database.

If I change the query to:

SELECT COUNT(rider_id) FROM participants WHERE race_id=305 AND group_id IN 
(SELECT id FROM groups WHERE timing!=0)

It works. Please explain me why, since I'm not able to find out why. The first 
query (with "timing=1") does work on my test-web-server (using a 
test-sql-server).

mysql> describe groups;
+----------+-----------------------+------+-----+---------+----------------+
| Field    | Type                  | Null | Key | Default | Extra          |
+----------+-----------------------+------+-----+---------+----------------+
| id       | mediumint(8) unsigned |      | PRI | NULL    | auto_increment |
... a lot of other fields deleted from the list...
| timing   | tinyint(1)            |      |     | 1       |                |
+----------+-----------------------+------+-----+---------+----------------+

The web-server is using PHP 4.3

-- 
Jørn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to