On Friday 24 August 2001 16:55, Balak, Frank wrote:
> yves,
>
> Start the transaction with ibase_trans() before you call
> ibase_execute.
>
> As to how is it possible, I don't really know for sure. I would
> presume it has to do with how Interbase handles transactions.
>
> Frank

Frank,
thank you, I've tried it, and even found something similar in the 
phpbuilder.com mailing list archives, but it sill doesn't work
This is my new code:

$dbh = connectdb();
$sth = ibase_prepare('INSERT INTO LOG 
(DATETIME,REMOTE_ADDR,HTTP_HOST,REQUEST_URI,HTTP_REFERER,HTTP_USER_AGENT) 
VALUES (?,?,?,?,?,?)');
$trans=ibase_trans();
ibase_execute($sth,
$now,
substr(get_var('REMOTE_ADDR',' '),0,24),
substr(get_var('HTTP_HOST',' '),0,24),
substr(get_var('REQUEST_URI',' '),0,99),
substr(get_var('HTTP_REFERER',' '),0,99),
substr(get_var('HTTP_USER_AGENT',' '),0,99));
ibase_commit($trans);
ibase_close($dbh);


The code I found on phpbuilder.com said the following:
$trans = ibase_trans();
ibase_query ($c, $sql);
ibase_commit( $trans);

heck, what do I do wrong?



> ------------------------------
> Franklin J. Balak Jr.
> Quality Assurance Data Analyst
> Brown Printing Company
> Waseca Division
> Waseca, MN. 56093
> Voice: 507-835-0253
> Fax: 507-835-0293
> ------------------------------
>
> -----Original Message-----
> From: Yves Glodt [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 23, 2001 14:11
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Another Interbase question
>
>
> Look at this:
>
> <?php
> include('include.php');
>
> $dbh = connectdb();
> $sth = ibase_prepare('INSERT INTO LOG
> (DATETIME,REMOTE_ADDR,HTTP_HOST,QUERY_STRING,HTTP_USER_AGENT,REQUEST_
>URI,HTT P_REFERER)
> VALUES (?,?,?,?,?,?,?)');
> ibase_execute($sth,
> $now,
> $HTTP_SERVER_VARS['REMOTE_ADDR'],
> $HTTP_SERVER_VARS['HTTP_HOST'],
> $HTTP_SERVER_VARS['QUERY_STRING'],
> $HTTP_SERVER_VARS['HTTP_USER_AGENT'],
> $HTTP_SERVER_VARS['REQUEST_URI'],
> $HTTP_SERVER_VARS['HTTP_REFERER']);
> ibase_commit();
> ibase_close($dbh);
>
> ?>
>
> when it gets called, and I do a select in isql, I do not see any of
> the records. Only after doing a "manual" commit in isql, I can see
> the new data.
>
> How is that possible?
>
> yves

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to