Fwd: [UPHPU] Postgres Insert ID
sean at exit12.org
Wed Oct 22 15:20:36 MDT 2008
---------- Forwarded message ----------
From: Sean Thayne <sean at exit12.org>
Date: Wed, Oct 22, 2008 at 3:20 PM
Subject: Re: [UPHPU] Postgres Insert ID
To: bigdog at venticon.com
Thanks, that's a bummer, wonder by Postgres doesn't have a feature like
this. Don't most database servers have a equivalent function?
On Wed, Oct 22, 2008 at 3:18 PM, thebigdog <bigdog at venticon.com> wrote:
> > I'm not having any luck finding the equivalent to mysqli_insert_id() for
> > postgres. I've seen the method of getting the id from the sequence, but
> > hoping for a better way to do then that...
> technically, there is not a php function in postgesql like that function.
> can write a query to provide that information based on the sequence that
> you are
> select currval('sequence_name');
> that will return the last value used. however, there is not a php function
> will provide the functionality that mysqli_insert_id() does.
> here is some additional info on it:
More information about the UPHPU