Re: in-date news items

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
Cc: Ian Barwick <barwick(at)gmx(dot)de>, pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: in-date news items
Date: 2002-03-12 18:23:38
Message-ID: 20020312102311.K65916-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


> Thanks for that Ian, worked a treat. However, can someone tell me why
>
> select n.ntimestamp, n.nmid from news n where n.ntimestamp > current_time -
> interval '5 minutes';
>
> works while
>
> select n.ntimestamp, n.nmid, m.mfname, m.mlname
> from news n, members m
> order by ntimestamp desc
> limit 1
> where (n.nmid = m.mid) and
> (n.ntimestamp > current_time - interval '5 minutes');
>
> has a parse error at or near "where"

The where clause should go between the from and order by.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ivan Manuel Andrade Muñoz 2002-03-13 02:23:03 to unsubcribe?
Previous Message Culley Harrelson 2002-03-12 17:55:53 Support for "nested sets" and PHP (Re: Recursive select)