You are here: Re: comparing datetime() in database « PHP Programming Language « IT news, forums, messages
Re: comparing datetime() in database

Posted by Michael Fesser on 08/02/07 08:55

..oO(newbie)

>I want to query all the orders that are placed on a particular
>month( and different month has different ending date--28, 30, 31). I
>want to have a sort of function with the following interface, is there
>an existing mysql function does that?
>Thanks.
>
>function select_order_of_month($month) {
> $sql_query = "SELECT COUNT(*) FROM `order` WHERE *I really want to
>specify the interval for the whole month here*";
>}

$sql_query = "
SELECT COUNT(*)
FROM `order`
WHERE MONTH(orderDate) = $month";

Micha

 

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

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