You are here: Re: Count problem « PHP Programming Language « IT news, forums, messages
Re: Count problem

Posted by Wayne Delia on 06/21/05 00:20

Andy Hassall wrote:
> On Mon, 20 Jun 2005 21:06:21 GMT, Wayne Delia <wmd@deliafamily.net> wrote:
>
>
>>Bryan wrote:
>>
>>>I've been trying to work out a problem but I'm having no luck. I have
>>>field in my table for area and I need to count the number of matches
>>>and assign a variable for each one.. this is what I have but it doesn't
>>>work.. any ideas?
>>>
>>>$testcount = mysql_query("select area, count(area) as newcount from rea
>>>group by area order by area");
>
> ^^^^^^^^^^^^^
>
>>MySql queries involving count(columname) require a GROUP BY clause, for
>>starters.
>
>
> Like the one he's already got? :-)

Oh, man - I can't believe that. That's about the third similar mistake
I've made today. I should probably go back to bed right now.

WMD

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация