Re: count(*) send a wrong value

2006-01-24 Thread Fabien SK
Le mardi 24 janvier 2006 à 19:23 +0100, Fabien SK a écrit : > Le mardi 24 janvier 2006 à 19:08 +0100, fabsk a écrit : > > Thank you a lot for your answer. The bug is there: if I drop the index > > 'tp_idx_part_solution', the result of the count is OK. > > I recreated this index and the cound drop

Re: count(*) send a wrong value

2006-01-24 Thread Fabien SK
Le mardi 24 janvier 2006 à 19:08 +0100, fabsk a écrit : > Thank you a lot for your answer. The bug is there: if I drop the index > 'tp_idx_part_solution', the result of the count is OK. > I recreated this index and the cound drop to "2" again. It doesn't happen on version 4.1.12-Max on my machine

Re: count(*) send a wrong value

2006-01-24 Thread fabsk
Le mardi 24 janvier 2006 à 09:19 +0100, Martijn Tonies a écrit : >> 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 K

Re: count(*) send a wrong value

2006-01-24 Thread Martijn Tonies
> 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 NU

Re: count(*) send a wrong value

2006-01-24 Thread fabsk
that > you aren't inadvertently writing the query incorrectly and that you really > DO have 10 rows with cid = 123. If you still get 2 as the result of your > query, I would recommend sending a bug report to MySQL. > > Rhino > > - Original Message - > Fro

Re: count(*) send a wrong value

2006-01-23 Thread Hank
My guess would that your PHP code is not written correctly. For instance, if you have a query in PHP: $sql="select * from my_table where cid=123"; ...and are using the PHP function mysql_numrows() to count the results, and then for your next test... you're just changing the query to: $sql="sele

Re: count(*) send a wrong value

2006-01-23 Thread Michael Stassen
fabsk wrote: > Hi, > > I'm facing a strange problem. I am using a database at my Internet > provider (Free, France). The type of table is MyISAM (no choice), MySQL > 4.1.15. I can do my tests with my PHP code or phpMyAdmin. > > The definition of my table is: > - uid, int > - cid, int > - response,

Re: count(*) send a wrong value

2006-01-23 Thread Rhino
o - Original Message - From: "fabsk" <[EMAIL PROTECTED]> To: Sent: Monday, January 23, 2006 5:32 PM Subject: Re: count(*) send a wrong value Thank you for you answer, but I read many times and I did not found something to answer my question (well, I did not know about the NUL

Re: count(*) send a wrong value

2006-01-23 Thread fabsk
gt; combinations that do not contain NULL by giving a list of > expressions. In standard SQL, you would have to do a > concatenation of all expressions inside COUNT(DISTINCT ...). > > COUNT(DISTINCT ...) was added in MySQL 3.23.2. > > Keith > > In theory, theory and pr

Re: count(*) send a wrong value

2006-01-23 Thread Fabien SK
gt; combinations that do not contain NULL by giving a list of > expressions. In standard SQL, you would have to do a > concatenation of all expressions inside COUNT(DISTINCT ...). > > COUNT(DISTINCT ...) was added in MySQL 3.23.2. > > Keith > > In theory, theory and pr

Re: count(*) send a wrong value

2006-01-23 Thread mysql
concatenation of all expressions inside COUNT(DISTINCT ...). COUNT(DISTINCT ...) was added in MySQL 3.23.2. Keith In theory, theory and practice are the same; In practice they are not. On Mon, 23 Jan 2006, fabsk wrote: > To: mysql@lists.mysql.com > From: fabsk <[EMAIL PROTECTE

count(*) send a wrong value

2006-01-23 Thread fabsk
Hi, I'm facing a strange problem. I am using a database at my Internet provider (Free, France). The type of table is MyISAM (no choice), MySQL 4.1.15. I can do my tests with my PHP code or phpMyAdmin. The definition of my table is: - uid, int - cid, int - response, text - points, int (can be null