Subject | Re: [firebird-php] auto increment last insert |
---|---|
Author | Yves Glodt |
Post date | 2004-11-24T10:22:34Z |
<snip>
use the function
int ibase_gen_id ( string generator [, int increment [, resource
link_identifier]])
e.g.: $newcontactid = ibase_gen_id ('GEN_CONTACT',1,$dbh);
See here:
http://lu2.php.net/ibase_gen_id
Best regards,
Yves
> [Alan McDonald] Firefox os the browser, Firebird is the RDBMSIn general, since PHP5, instead of "SELECT GEN_ID(..." you can also
>
> This is how I get a new value
> $newcontactid = $db->get_var("SELECT GEN_ID(GEN_CONTACT,1) FROM
> RDB\$DATABASE");
use the function
int ibase_gen_id ( string generator [, int increment [, resource
link_identifier]])
e.g.: $newcontactid = ibase_gen_id ('GEN_CONTACT',1,$dbh);
See here:
http://lu2.php.net/ibase_gen_id
Best regards,
Yves
> Then you use it to insert your new record
> Alan
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> Yahoo! Groups Links
>
>
>