if ($current["mday"] < 10) {
$current["mday"] = "0" . $current["mday"];
}
if ($current["mon"] < 10) {
$current["mon"] = "0" . $current["mday"];
}
$sql = "SELECT * FROM yourtable WHERE datefield BETWEEN " . $current["year"] . $current"month"] . $current["mday"] - ($current["mday"] - 1) . " and " . $current["year"] . $current"month"] . $current["mday"] . " "
At 10:29 AM 1/5/2004, you wrote:
Dave Carrera wrote:
> How do I return from a MySql db, rows which only contain data for the
> CURRENT Month / Year ?
>
> So this month would currently return 5 days worth of data since it’s the 5th
> of Jan 2004.
>
> Thank you in advance for any examples, pointers or urls that may help with
> this.
What is your table structure?
-- Seks, seksić, seksolatki... news:pl.soc.seks.moderowana http://hyperreal.info { iWanToDie } WiNoNa ) ( http://szatanowskie-ladacznice.0-700.pl foReVeR( * ) Poznaj jej zwiewne kształty... http://www.opera.com 007
David G. O'Brien Web Services Coordinator / Systems Administrator
NACCRRA The Nation's Network of Child Care Resource & Referral 1319 F Street NW, Suite 500 Washington, DC 20004 (202) 393-5501 ext. 113 (202) 393-1109 fax