> Thank you a lot for your answer. I checked very carefully. The structure
> of the table is (exported by phpMyAdmin):
>
> CREATE TABLE `tp_participation` (
>   `uid` int(11) NOT NULL default '0',
>   `challenge_id` int(11) NOT NULL default '0',
>   `response` text collate latin1_general_ci NOT NULL,
>   `points` int(11) default NULL,
>   UNIQUE KEY `tp_id_part` (`uid`,`challenge_id`),
>   KEY `tp_idx_part_solution` (`challenge_id`,`response`(4))
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
>
>
> I removed the key on challenge_id as suggested in another post.
>
> I do the following queries with phpMyAdmin (no direct access to mysql
> client):
>
> select * from tp_participation where challenge_id=20
> > 10 records.
>
> select challenge_id from tp_participation where challenge_id=20
> > _two_ records with the value "20".
>
> select count(challenge_id) from tp_participation where challenge_id=20
> > One record with value "2"
>
> select count(*) from tp_participation where challenge_id=20
> > One record with value "2"
>
> select count(uid) from tp_participation where challenge_id=20
> > One record with value "10"
>
> select count(response) from tp_participation where challenge_id=20
> > One record with value "10"
>
> select count(points) from tp_participation where challenge_id=20
> > One record with value "select count(response) from tp_participation
> where challenge_id=20
> > One record with value "0" (value of points is null for each field with
> challenge_id in the database, so it seems normal)

What are the results if you drop all constraints and indices?

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


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

Reply via email to