You are here: Re: select data between date « PHP SQL « IT news, forums, messages
Re: select data between date

Posted by Anthony Frost on 12/04/05 16:41

In message <dmusbk$m2c$1@domitilla.aioe.org>

> idBirth - autonumeric
> date - date (YYYY-MM-DD)
> timestart - time (00:00:00)
> timeend - time (00:00:00)
>
> idBirth is that I use to relation with another tables.
>
> My trouble is: I don't know how to select a value between 2 dates. (i.e.
> 2005-12-04 and 2005-1-15).

First of all, stick to the same date format. Your second date needs to
be 2005-01-15 which then means you can do a simple comparison like...

....WHERE date < '2005-01-15 AND date > '2005-12-04'

....in your SELECT clause.

Anthony

 

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

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