Ricardo - 

I assume you mean that you want the record that was previously inserted into the 
database, 
and the next record that was inserted?

There is no way I can think of using native SQL, but why don't you store a DateTime 
column in 
the DB (for when the item was inserted), and use that to query the next and previous 
records?

That work?

Cheers,

Mark
------------------------------------------------------------------
[EMAIL PROTECTED]
ICQ: 3094740
Safe From Bees
[ www.safefrombees.com ]


Quoting Ricardo Russon <[EMAIL PROTECTED]>:

> Morning guys...
> 
> Is there a quick (and clean or dirty) way of finding the previous and next
> record from a database? I would just use the auto increment to do it, but I
> am not willing to trust that records won't get deleted. And I didn't want to
> grab the whole table and process it.
> 
> TIA
> Ricardo.
> 
> 
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> 
> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> http://www.mxdu.com/ + 24-25 February, 2004
> 
> 
> 

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to