I have a postgresql table I need to search through BUT I need to search by month. Example. I am using this sql statement now:
$sql1 = "SELECT SUM(in_bytes) FROM bandwidth_log WHERE site_id='1'";
but I would like to have the sum statement get all from a given month like "WHERE date=12" but the timestamp is in the format of: 2002-12-05 00:00:00-06
Can anyone give me a clue and/or answer.
Thanks