X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0D6155650C for ; Wed, 9 Mar 2005 15:16:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 44591-07 for ; Wed, 9 Mar 2005 15:16:42 +0000 (GMT) Received: from vscan01.westnet.com.au (vscan01.westnet.com.au [203.10.1.131]) by svr1.postgresql.org (Postfix) with ESMTP id 8B69E55CEE for ; Wed, 9 Mar 2005 15:16:40 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id E03AFCCC20; Wed, 9 Mar 2005 23:16:42 +0800 (WST) Received: from vscan01.westnet.com.au ([127.0.0.1]) by localhost (vscan01.westnet.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22746-02; Wed, 9 Mar 2005 23:16:42 +0800 (WST) Received: from [202.72.133.22] (dsl-202-72-133-22.wa.westnet.com.au [202.72.133.22]) by vscan01.westnet.com.au (Postfix) with ESMTP id 9297A51B53; Wed, 9 Mar 2005 23:16:42 +0800 (WST) Message-ID: <422F135B.5040600@familyhealth.com.au> Date: Wed, 09 Mar 2005 23:16:43 +0800 From: Christopher Kings-Lynne User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: enzovenegas@mixmail.com Cc: "pgsql-php@postgresql.org" Subject: Re: format query References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/32 X-Sequence-Number: 3047 > 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