Date: 10/12/00
- Next message: omar cromwell mercado: "[PHP-DB] --with-oracle or --with-oci8 for oracle8i support?"
- Previous message: Lee Pope: "[PHP-DB] newbie question: FoxPro Tables and ODBC"
- In reply to: Todd Cary: "[PHP-DB] Inserting into Interbase DB"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Todd Cary <todd <email protected>> wrote:
> With the syntax below, the insert is not commited. What have I missed?
>
> Todd
>
> function insert_session($dbhdl, $ID) {
> $statemt = 'INSERT INTO SESSIONS (SES_SESSION_ID) VALUES(' . $ID .
> ')';
> $sthdl = ibase_query($statemt,$dbhdl);
> };
Your syntax is ok and should do the job. The only thing is that
you have exchanged the order of $statement and $dbhandle, but this
is only critical if there is more than one open db connection
in your script.
Try it with
$sthdl = ibase_query($dbhdl,$statemt) or die(ibase_errmsg());
that you don't miss the error message if an error occurs.
If you are trying to access the inserted session_id on the same
page add a call to ibase_commit() after the ibase_query().
Lutz
-- ibWebAdmin 0.2alpha *** web-based InterBase database administration *** download the latest version from http://home.knuut.de/lb/ ***-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: omar cromwell mercado: "[PHP-DB] --with-oracle or --with-oci8 for oracle8i support?"
- Previous message: Lee Pope: "[PHP-DB] newbie question: FoxPro Tables and ODBC"
- In reply to: Todd Cary: "[PHP-DB] Inserting into Interbase DB"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

