Reply to Re: It is possible?

Your name:

Reply:


Posted by IchBin on 10/11/10 11:58

vito wrote:
> I have the following table in mysql:
>
> id | description
> 1 | some text1
> 1-A |
> 2 | some text1
> 3 | some text3
> 3-A |
>
> I must count number of record that have tha same value with row
> "description"
> and additionally record 1-A is the same description like 1 and 3-A is the
> same like 3
> (but default there are empty).
>
> For example numer of records with "some text1" descriptions are 3 (1,1-A,2).
> It is possible to do it with only mysql query?
>
>
If I understand you correctly:
select id,description,count(*) from table group by SUBSTRING( id, 1,1);

--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

[Back to original 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

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