Re: format query - Mailing list pgsql-php

From Christopher Kings-Lynne
Subject Re: format query
Date
Msg-id 422F135B.5040600@familyhealth.com.au
Whole thread Raw
In response to format query  ("enzo venegas palacios" <enzovenegas@mixmail.com>)
List pgsql-php
> I am trying to build a query sql that select all rows in my table with a
> spesific month (format timestamp, yyy-mm-dd hh:mm:ss), for example, all of
> january, select * from table where field_date = 01.
> but i don't know the specific query

select * from table where extract(month from field) = 1;

Chris

pgsql-php by date:

Previous
From: "Todd Lewis"
Date:
Subject: Re: format query
Next
From: "Van Ingen, Lane"
Date:
Subject: Can't Get PHP Going on PostgreSQL