Subject Re: Re: [firebird-php] auto increment last insert
Author Michal Žeravík
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 [mailto: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:
> http://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:
> 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]
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>