Maria,
Maria Garcia Suarez sagte:
> Hi there!
>
> I'm currently developing a web where we let users
> create their own forums. All the messages (wherever
> they are posted) are stored in the same mysql table.
>
> When users read a certain message I would like to
> display the previous and next mes
nd last
record by post_date < {current msg post_date} in same forum
> -Original Message-
> From: Maria Garcia Suarez [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 09, 2003 11:53 AM
> To: [EMAIL PROTECTED]
> Subject: How to get previous and next result
>
>
> Hi
Hi there!
--- Christopher Knight <[EMAIL PROTECTED]> wrote:
> next:
> select cols from table where id > YOUROLDID and
> forums = CURRENT_FORUM order by id limit 1
> previous:
> select cols from table where id < YOUROLDID and
> forums = CURRENT_FORUM order by id desc limit 1
Thanks for your answer
[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 10:53 AM
To: [EMAIL PROTECTED]
Subject: How to get previous and next result
Hi there!
I'm currently developing a web where we let users
create their own forums. All the messages (wherever
they are posted) are stored in the same mysql tabl
esday, September 09, 2003 12:35
To: Mark Richards; [EMAIL PROTECTED]
Subject: RE: How to get previous and next result
Hi there!
--- Mark Richards <[EMAIL PROTECTED]> wrote:
> If you simply have a table with an id field that has
> the auto-increment
> attribute (field is int(10))
Hi there!
--- Mark Richards <[EMAIL PROTECTED]> wrote:
> If you simply have a table with an id field that has
> the auto-increment
> attribute (field is int(10)) then you can get the
> current id and go from
> there. To get the current ID of a record you just
> created, you can use the
> mysql_in
terms often, not like a SQL designer!
Hugs,
Mark Richards
-Original Message-
From: Maria Garcia Suarez [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 11:53
To: [EMAIL PROTECTED]
Subject: How to get previous and next result
Hi there!
I'm currently developing a web where w
Hi there!
I'm currently developing a web where we let users
create their own forums. All the messages (wherever
they are posted) are stored in the same mysql table.
When users read a certain message I would like to
display the previous and next message in that forum.
Since all the messages (of t