HI, JC
I use php_do_sqlite with PHP 5.1.4 and Sqlite 3.2.8 on Windows XP. The following is my coding:

<?php
try{
$dsn = 'sqlite:counter/cntdata.sq3';
$myConn = new PDO($dsn);
$myConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$myPre = $myConn->prepare('update test_item set balqty = 100');
$myPre->execute();
}catch (PDOException $e){
 die('execute err: '.$e->getMessage());
}
print('done!');
?>
-----
And the error is:
execute err: SQLSTATE[HY000]: General error: 1 SQL logic error or missing database

-----
Would you please have a look and give me an advise. Thank you!


Jack


----- Original Message ----- From: "DJ Anubis" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Thursday, June 01, 2006 4:03 PM
Subject: Re: [sqlite] question about php_pdo_sqlite


yuyen wrote:
Hi, all

I try to use php_pdo_sqlite in php which is a sqlite of version 3.2.8. With php_pdo, it provides PREPARE and EXECUTE functions to prepare an sql at first then which can execute later. But it seems that the php_pdo_sqlite.dll doesn't support it. Or I may do somthing wrong. If there is anyone who has the experience, please give me an advice. Thank you!


Jack

Hi Jack,

I use php_do_sqlite too, with PHP 5.1.4 and SQlite 3.2.8, Linux build.
Prepare and Execute methods work well, but I remeber some problems with
PHP 5.0.4 builds.

JC


Reply via email to