Hello,
I want to implement a distributed database using sqlite. Can some one give
me information of whether SQLite supports two phase commit?
Thanks,
Shailesh.
___
sqlite-users mailing list
sqlite-users@sqlite.org
Well, I didn't think BLOB stores text more efficiently. It's just that my
data is actually in binary. To store it in text I'll have to encode it,
which thus require twice storage as large.
Anyway, I've managed to create my own custom aggregate function to
accomplish this. The initial results
Why do you think a BLOB stores text more efficiently? Do you compress it?
He Shiming wrote:
> Hi,
>
> I would like to know if there is some workaround to use group_concat on
> binary columns.
>
> For performance consideration, I need to query two tables and accomplish
> data retrieval in a
Hi,
I would like to know if there is some workaround to use group_concat on
binary columns.
For performance consideration, I need to query two tables and accomplish
data retrieval in a single SELECT. There is this BLOB column, originally
designed as BLOB rather than text so that the storage
When you call phpinfo(); do you see that the PDO functionality is enabled?
Is SQLite listed as one of the databases?
http://us.php.net/manual/en/function.phpinfo.php
Also look at your /etc/php.ini file. Assuming your binary of php is
using extensions, are the extensions for sqlite being loaded?
Aharon (Rony) Shapira wrote:
>
>
> $db = new SQLiteDatabase($file) or die("Could not open database");
>
> I got the following:
>
> Fatal error: Uncaught exception 'SQLiteException' with message
> 'SQLiteDatabase::__construct() [
Hi,
It looks like the PDO extension was not installed/enabled. This is a
little unusual since "PDO ships with PHP 5.1", according to the PHP Manual.
I suggest that you install and enable the PDO extension. Read:
http://www.php.net/manual/en/ref.pdo.php
Looks like you need to recompile PHP with the option.
Aharon (Rony) Shapira wrote:
> I tried using PDO as follows :
> // create a SQLite3 database file with PDO and return a database handle
>
> try{
>
> $dbHandle = new
> PDO('sqlite:'.$_SERVER['DOCUMENT_ROOT'].'/../pdoTutorial.sqlite3');
>
>
I haven't tried to get it but I understand the Sqlite.org CVS server has
it archived. You should also be able to create the DB from PHP. Sqlite
open creates a DB if the file does not exist.
Aharon (Rony) Shapira wrote:
> Great. PHP has sqlite2 as you said. I could use it to create a db and
Great. PHP has sqlite2 as you said. I could use it to create a db and add a
table. But when downloaded from the server to my pc couldn't get hold of it.
I have a command-line program for accessing and modifying SQLite3 databases
which seems not to recognise it. How do I get one for sqlite2?
I tried using PDO as follows :
// create a SQLite3 database file with PDO and return a database handle
try{
$dbHandle = new
PDO('sqlite:'.$_SERVER['DOCUMENT_ROOT'].'/../pdoTutorial.sqlite3');
}catch( PDOException $exception ){
die($exception->getMessage());
}
but got the following error
PHP has Sqlite V2 embedded. Use PDO to get Sqlite3.
P Kishor wrote:
> On 3/9/08, Aharon (Rony) Shapira <[EMAIL PROTECTED]> wrote:
>
>>Sorry. When I set $db and use $db the message I get is:
>>
>> Warning: sqlite_open() [function.sqlite-open]: file is encrypted or is not a
>> database in
On Sun, Mar 09, 2008 at 03:51:23PM +0300, Aharon (Rony) Shapira wrote:
> I created a simple table named "books" in "library.db".
> After entering "select * from books" I saw the data that I put into it.
>
> When trying to access it through php:
> $file = "library.db";
> // open database file
>
On 3/9/08, Aharon (Rony) Shapira <[EMAIL PROTECTED]> wrote:
> Sorry. When I set $db and use $db the message I get is:
>
> Warning: sqlite_open() [function.sqlite-open]: file is encrypted or is not a
> database in /home/zbfckla/public_html/Ocx.php on line 49
> Could not open database
>
again,
Sorry. When I set $db and use $db the message I get is:
Warning: sqlite_open() [function.sqlite-open]: file is encrypted or is not a
database in /home/zbfckla/public_html/Ocx.php on line 49
Could not open database
- Original Message -
From: "P Kishor" <[EMAIL PROTECTED]>
To: "General
I don't know how PHP's db connector works but...
On 3/9/08, Aharon (Rony) Shapira <[EMAIL PROTECTED]> wrote:
>
> I created a simple table named "books" in "library.db".
> After entering "select * from books" I saw the data that I put into it.
>
> When trying to access it through php:
> $file
I created a simple table named "books" in "library.db".
After entering "select * from books" I saw the data that I put into it.
When trying to access it through php:
$file = "library.db";
// open database file
$handle = sqlite_open($db) or die("Could not open database");
I got the following:
Eliedaat,
Thanks a lot , it really helped.
I have added
sqlite3_exec(db,"BEGIN;",NULL,NULL,) before the for loop and
sqlite3_exec(db,"END;",NULL,NULL,) after the loop and now it takes only
250 milliseconds instead of 2 secs.
Marco.
"Adler, Eliedaat" <[EMAIL PROTECTED]> wrote:
Executing BEGIN TRANSACTION before and END TRANSACTION after the full
insert will greatly improve
Your performance.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vincent Vega
Sent: Sunday, March 09, 2008 12:44 PM
To: sqlite-users@sqlite.org
Subject:
Hi all ,
I need to insert 500 records (each record has 12 bytes) to a table and it
takes me approximately 2 seconds.
Is there a way to improve my code so it can do it faster?
Thanks in advance,
Marco.
Here is my code:
query = sqlite3_mprintf("Insert into Inventory (Tag)
20 matches
Mail list logo