Dear Peter,

% On 2007-11-01 at 01:05:15 +0100, Peter Lukezic wrote:
> but in the database components i’m looking for something to get the id of my
> last insert statement… perhaps someone could help...
> eg.
> 
> $q = $this->db->createInsertQuery();
> $q->insertInto( '_nic2006' )
> ->set( 'id', $q->bindValue( ) )
> ->set( 'plz', $q->bindValue( '1010' ) )
> ->set( 'ort', $q->bindValue( "wien" ) );
> $stmt = $q->prepare();
> $stmt->execute();

Caveats apply, ymmv, but this is in the docs.

$my_id = $this->db->lastInsertId();


Warm regards,
-- 
Gontran
% # E Pluribus Unix
% /usr/bin/fortune
I don't deserve this award, but I have arthritis and I don't deserve that
either.
                -- Jack Benny
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to