Subject Re: [firebird-php] auto increment last insert
Author Michal Žeravík
Of course not, but the manual header says:
ibase_gen_id
(PHP 5)
ibase_gen_id -- Increments the named generator and returns its new value

I'm FB newbie as well, but It's good to see manual before flood
mailinglist I think.

Michal


Johan van Zyl wrote:

>If the answer to everything is RTFM then we may as well close [firebird-php]
>down!
>Greetings
>
>-----Original Message-----
>From: Michal �erav�k [mailto:michalz@...]
>Sent: 24 November 2004 12:58
>To: firebird-php@yahoogroups.com
>Subject: Re: Re: [firebird-php] auto increment last insert
>
>
>
>ibase_gen_id is for php5.,
>rtfm
>
>michal
>
>
>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
>>/home/e-smith/files/ibays/Primary/html/mc/register.php on line 116
>>
>>what is $dbh?
>>Greetings
>> -----Original Message-----
>> From: Yves Glodt [######*yglodt@...]
>> Sent: 24 November 2004 12:23
>> To: firebird-php@yahoogroups.com
>> Subject: **SPAM** Re: [firebird-php] auto increment last insert
>>
>>
>>
>> <snip>
>> > [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");
>>
>> In general, since PHP5, instead of "SELECT GEN_ID(..." you can also
>> use the function
>>
>> int ibase_gen_id ( string generator [, int increment [, resource
>> link_identifier]])
>>
>> e.g.: $newcontactid = ibase_gen_id ('GEN_CONTACT',1,$dbh);
>>
>> See here:
>> ####***lu2.php.net/ibase_gen_id
>>
>> Best regards,
>> Yves
>>
>> > 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
>> ADVERTISEMENT
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------------
>>
>>
>-
>
>
>>--
>> Yahoo! Groups Links
>>
>> a.. To visit your group on the web, go to:
>> ####***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 (####***www.grisoft.com).
>>Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19
>>
>>
>>[Non-text portions of this message have been removed]
>>
>>
>>
>>
>>
>>Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (####***www.grisoft.com).
>Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19
>
>---
>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
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>



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