You are here: Re: mysql help needed « PHP Programming Language « IT news, forums, messages
Re: mysql help needed

Posted by Bob Bedford on 07/06/06 15:27

Hi all,

> SELECT count( DISTINCT a.idperson ) , b.region
> FROM `table1` a
> JOIN `table2` b
> USING ( zip )
> GROUP BY region

Now I've an other question, as I can't get it to work, even with your
example.

I've a table where there is a datetime field.

I'd like to count the number of articles created every day. How to do so ?

I've tried this:
select distinct date_format(DateTimeCreation,'%d %m %Y'), count(distinct
idarticle) from articles group by DateTimeCreation order by DateTimeCreation
ASC

What I'd like is a table with
date nbre of creation
2006-01-01 3
2006-01-02 2
2006-01-03 5
2006-01-04 7

and so on.....
actually I've:
DateTimeCreation
2006-01-01 09:11:03
2006-01-01 12:01:22
2006-01-01 18:42:17
2006-01-02 10:27:55
.....

Thanks for help.

Bob

 

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

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