Subject RE: [firebird-php] auto increment last insert
Author agung wibowo
this is work in isql:
"select gen_id(gen_data_id,0) from RDB$DATABASE;"
the result is gen_id column with last value inserted,
but i don't know about PHP, maybe it's work to..


Alan McDonald <alan@...> wrote:

Hi

I believe that Firefox uses gen_id to trigger a generator to be used
for auto incrementing values. Mysql on PHP has an easy way
(mysql_insert_id) in determining the last inserted id. Do we have a
corresponding feature like this for firebird?

Thanks.

Arnold



[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");
Then you use it to insert your new record
Alan


[Non-text portions of this message have been removed]


Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/

To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.





---------------------------------
Do you Yahoo!?
Meet the all-new My Yahoo! � Try it today!

[Non-text portions of this message have been removed]