Subject Re: [firebird-php] auto increment last insert
Author Yves Glodt
<snip>
> [Alan McDonald] Firefox os the browser, Firebird is the RDBMS
>
> This is how I get a new value
> $newcontactid = $db->get_var("SELECT GEN_ID(GEN_CONTACT,1) FROM
> RDB\$DATABASE");

In general, since PHP5, instead of "SELECT GEN_ID(..." you can also
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
>
>
>