OK,, I'll clarify: A query like: SELECT terms, count(*) AS count FROM searches GROUP BY terms HAVING count(*)>1 ORDER BY count DESC
Is run on a table built by users searches on a site, so there are lots of duplicate entries, were trying to count the duplicates to determine the most popular search terms. The problem arises where you do a query like SELECT * FROM 'terms' WHERE term='test' And count the number of rows returned (with php or whatever) the issue is that the result from the count() function ends up being a little higher sometimes but by no more than 3 instances. --=C ----- Original Message ----- From: "Paul DuBois" <[EMAIL PROTECTED]> To: "McIrvin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, September 18, 2002 5:06 PM Subject: Re: count function issue > At 16:50 -0500 9/18/02, McIrvin wrote: > >Doing queries to determine the number of times search terms are used on a > >web site. > > > >Here is a sample sql query. > > > >SELECT terms, count(*) AS count FROM searches GROUP BY terms HAVING > >count(*)>1 ORDER BY count DESC > > > >But the results seem to be inaccurate, by no more that 3. > > Sorry, it's difficult to parse that last sentence. > > Also, since you don't indicate what you expect and what you actually > got, it's hard to say whether what you're seeing is to be expected. > > > > >Anyone run into anything like this before? > > > > > > > >--------------------------------------------------------------------- > >Before posting, please check: > > http://www.mysql.com/manual.php (the manual) > > http://lists.mysql.com/ (the list archive) > > > >To request this thread, e-mail <[EMAIL PROTECTED]> > >To unsubscribe, e-mail <[EMAIL PROTECTED]> > >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php