Subject | RE: RE: RE: [firebird-php] auto increment last insert |
---|---|
Author | Johan van Zyl |
Post date | 2004-11-24T09:43:58Z |
$userid = $host->userid("SELECT GEN_ID(G_USERS,1) FROM RDB\$DATABASE");
//line 110
echo 'UserID = '.$userid.'<br/>';
$sql = ibase_query("INSERT INTO users (userid, first_name, last_name,
email_address, username, \"PASSWORD\", info)
VALUES('$userid', '$first_name', '$last_name', '$email_address',
'$username', '$db_password', '$info2')") or die (ibase_errmsg());
gives me
Fatal error: Call to a member function on a non-object in
/home/e-smith/files/ibays/Primary/html/mc/register.php on line 110
This
$userid=ibase_query('SELECT GEN_ID(G_USERS, 1) from rdb\$database'); //line
111
echo 'UserID = '.$userid.'<br/>';
$sql = ibase_query("INSERT INTO users (userid, first_name, last_name,
email_address, username, \"PASSWORD\", info)
VALUES('$userid', '$first_name', '$last_name', '$email_address',
'$username', '$db_password', '$info2')") or die (ibase_errmsg()); //line 115
gives me:
Warning: InterBase: Dynamic SQL Error SQL error code = -104 Token unknown -
line 1, char 35 \ in /home/e-smith/files/ibays/Primary/html/mc/register.php
on line 111
UserID =
Warning: InterBase: conversion error from string "" in
/home/e-smith/files/ibays/Primary/html/mc/register.php on line 115
conversion error from string ""
-----Original Message-----
From: Alan McDonald [mailto:alan@...]
Sent: 24 November 2004 11:16
To: firebird-php@yahoogroups.com
Subject: RE: RE: [firebird-php] auto increment last insert
So then this was supposed to work? But it does not. It complains about
NULL
userid
$userid=ibase_query('SELECT GEN_ID(G_USERS, 1) from rdb$database');
[Alan McDonald] notice
("SELECT GEN_ID(GEN_CONTACT,1) FROM RDB\$DATABASE"
the slash.... the $ sign will not go thru otherwise
Alan
[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]
//line 110
echo 'UserID = '.$userid.'<br/>';
$sql = ibase_query("INSERT INTO users (userid, first_name, last_name,
email_address, username, \"PASSWORD\", info)
VALUES('$userid', '$first_name', '$last_name', '$email_address',
'$username', '$db_password', '$info2')") or die (ibase_errmsg());
gives me
Fatal error: Call to a member function on a non-object in
/home/e-smith/files/ibays/Primary/html/mc/register.php on line 110
This
$userid=ibase_query('SELECT GEN_ID(G_USERS, 1) from rdb\$database'); //line
111
echo 'UserID = '.$userid.'<br/>';
$sql = ibase_query("INSERT INTO users (userid, first_name, last_name,
email_address, username, \"PASSWORD\", info)
VALUES('$userid', '$first_name', '$last_name', '$email_address',
'$username', '$db_password', '$info2')") or die (ibase_errmsg()); //line 115
gives me:
Warning: InterBase: Dynamic SQL Error SQL error code = -104 Token unknown -
line 1, char 35 \ in /home/e-smith/files/ibays/Primary/html/mc/register.php
on line 111
UserID =
Warning: InterBase: conversion error from string "" in
/home/e-smith/files/ibays/Primary/html/mc/register.php on line 115
conversion error from string ""
-----Original Message-----
From: Alan McDonald [mailto:alan@...]
Sent: 24 November 2004 11:16
To: firebird-php@yahoogroups.com
Subject: RE: RE: [firebird-php] auto increment last insert
So then this was supposed to work? But it does not. It complains about
NULL
userid
$userid=ibase_query('SELECT GEN_ID(G_USERS, 1) from rdb$database');
[Alan McDonald] notice
("SELECT GEN_ID(GEN_CONTACT,1) FROM RDB\$DATABASE"
the slash.... the $ sign will not go thru otherwise
Alan
[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]