Subject | RE: **SPAM** Re: [firebird-php] auto increment last insert |
---|---|
Author | Johan van Zyl |
Post date | 2004-11-24T12:02:18Z |
I am on PHP4, so I cannot use
$userid=ibase_gen_id(G_USERS) ?
I also have a Trigger T_USERS
AS
begin
if ( (new.userid is null) OR (new.userid <= 0) ) then
begin
new.userid = gen_id( g_USERS, 1 );
end
end
which is not required if
$userid=ibase_gen_id(G_USERS) ?
would work?
Cheers
JVZ
-----Original Message-----
From: Lester Caine [mailto:lester@...]
Sent: 24 November 2004 13:32
To: firebird-php@yahoogroups.com
Subject: Re: **SPAM** Re: [firebird-php] auto increment last insert
Johan van Zyl wrote:
$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.
http://lu2.php.net/manual/en/function.ibase-connect.php
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
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/
b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com
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 (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19
[Non-text portions of this message have been removed]
$userid=ibase_gen_id(G_USERS) ?
I also have a Trigger T_USERS
AS
begin
if ( (new.userid is null) OR (new.userid <= 0) ) then
begin
new.userid = gen_id( g_USERS, 1 );
end
end
which is not required if
$userid=ibase_gen_id(G_USERS) ?
would work?
Cheers
JVZ
-----Original Message-----
From: Lester Caine [mailto:lester@...]
Sent: 24 November 2004 13:32
To: firebird-php@yahoogroups.com
Subject: Re: **SPAM** Re: [firebird-php] auto increment last insert
Johan van Zyl wrote:
> Thx - butJohan - Thought you were still on PHP4?
> $userid = ibase_gen_id ('GEN_USERS',1,$dbh);
> gives me
> Fatal error: Call to undefined function: ibase_gen_id() in
$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.
http://lu2.php.net/manual/en/function.ibase-connect.php
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
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/
b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com
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 (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19
[Non-text portions of this message have been removed]