Subject RE: [firebird-php] auto increment last insert
Author Johan van Zyl
Thx Helen for another non-hostile, and as usual, very informative response!
We newbie's are having a though time, well at least in THIS forum! At least
I am!
You (me) apparently have to RTFM or FO<g>

And thx to all the other POSITIVE responses I have had!
It is REALLY appreciated. It is not easy being a PHP newbie!
If I am supposed to study ALL manuals in great detail before I am allowed to
ask a question here.....?


-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: 25 November 2004 00:23
Subject: RE: [firebird-php] auto increment last insert

At 09:01 AM 25/11/2004 +1100, you wrote:

>I've just arrived in the office - did this thread get completed?
>Is the original poster satisfied with the information?
>Basically, a set-by-step approach to replacing MySQL's autoinc, without
>procedures, triggers, and trying to get the value after the insert(could
>inaccurate if the generator's been used since the insert...)
>This example will use the following simple table:
>CREATE TABLE tbl_test (
> int_ID NUMERIC(18,0) NOT NULL,
> str_name VARCHAR(100),
>/* This is the generator for the tbl_test table */
>CREATE GENERATOR gen_tbl_test;

For safety, you should also create a trigger, in case the database is used
by other applications at some point:

CREATE TRIGGER BI_tbl_test for tbl_test
IF (new.int_ID IS NULL) THEN
new.int_ID = GEN_ID(gen_tbl_test, 1);

Yahoo! Groups Sponsor

Get unlimited calls to


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]