Subject RE: **SPAM** Re: [firebird-php] auto increment last insert
Author Johan van Zyl
Thx - but
$userid = ibase_gen_id ('GEN_USERS',1,$dbh);
gives me
Fatal error: Call to undefined function: ibase_gen_id() in
/home/e-smith/files/ibays/Primary/html/mc/register.php on line 116

what is $dbh?
-----Original Message-----
From: Yves Glodt [mailto:yglodt@...]
Sent: 24 November 2004 12:23
Subject: **SPAM** Re: [firebird-php] auto increment last insert

> [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

In general, since PHP5, instead of "SELECT GEN_ID(..." you can also
use the function

int ibase_gen_id ( string generator [, int increment [, resource

e.g.: $newcontactid = ibase_gen_id ('GEN_CONTACT',1,$dbh);

See here:

Best regards,

> Then you use it to insert your new record
> Alan
> [Non-text portions of this message have been removed]
> Yahoo! Groups Links

Yahoo! Groups Sponsor

Yahoo! Groups Links

a.. To visit your group on the web, go to:

b.. To unsubscribe from this group, send an email to:

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

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19

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