Subject | RE: **SPAM** Re: [firebird-php] auto increment last insert |
---|---|
Author | Johan van Zyl |
Post date | 2004-11-24T11:01:22Z |
$userid = ibase_gen_id ('G_USERS',1,$dbh); actually <g>
-----Original Message-----
From: Johan van Zyl [mailto:johan@...]
Sent: 24 November 2004 12:58
To: firebird-php@yahoogroups.com
Subject: RE: **SPAM** Re: [firebird-php] auto increment last insert
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>
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
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 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]
-----Original Message-----
From: Johan van Zyl [mailto:johan@...]
Sent: 24 November 2004 12:58
To: firebird-php@yahoogroups.com
Subject: RE: **SPAM** Re: [firebird-php] auto increment last insert
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 RDBMSIn general, since PHP5, instead of "SELECT GEN_ID(..." you can also
>
> This is how I get a new value
> $newcontactid = $db->get_var("SELECT GEN_ID(GEN_CONTACT,1) FROM
> RDB\$DATABASE");
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 recordYahoo! Groups Sponsor
> Alan
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
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 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]