You are here: Calculations in MySQL query « PHP SQL « IT news, forums, messages
Calculations in MySQL query

Posted by Ja NE on 11/18/05 12:30

I would like to get some statistic data about my members. I have column
named YYYY with int(4) where some members have entered their year of
birth. Now, I would like to see how many of them are, for example, age
40. So I have to serach for year 1965.:
(SELECT COUNT(*) FROM mytable WHERE YYYY="1965")
but douing so, I will need to make querys form 1940 (my oldest member)
to 1991 (my youngest member). and that is a lot of "questions"...

Is there any way to made such query "simplier", i.e. faster?

something like... don't know, missing knowlage about mysql possibilites
need a sort of "array like query"...

anyone have any idea? (I haven't found mysql refernce manual of big
help. isn't that good as php on-line manual)

tnx in advance.

--
Ja NE
http://fotozine.org/?omen=janimir
--

 

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

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