Subject RE: **SPAM** Re: [firebird-php] auto increment last insert
Author Johan van Zyl
I am on PHP4, so I cannot use
$userid=ibase_gen_id(G_USERS) ?

I also have a Trigger T_USERS
if ( (new.userid is null) OR (new.userid <= 0) ) then
new.userid = gen_id( g_USERS, 1 );
which is not required if
$userid=ibase_gen_id(G_USERS) ?
would work?

-----Original Message-----
From: Lester Caine [mailto:lester@...]
Sent: 24 November 2004 13:32
Subject: Re: **SPAM** Re: [firebird-php] auto increment last insert

Johan van Zyl wrote:

> Thx - but
> $userid = ibase_gen_id ('GEN_USERS',1,$dbh);
> gives me
> Fatal error: Call to undefined function: ibase_gen_id() in

Johan - Thought you were still on PHP4?
$dbh is optional, you need it if you have several connections open and
so have to select the one to use. It's the output of ibase_connect.

Also I think the increment defaults to '1' so you only 'need' the
generator name.

Lester Caine
L.S.Caine Electronic Services

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]