Re: RE: Re: Sqlite wrapper for Log package
| From: | Pierre-Alain Joye | Date: | Sun, 04 Jan 2004 20:42:49 +0000 |
| Subject: | Re: RE: Re: Sqlite wrapper for Log package | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24744@lists.php.net to get a copy of this message | ||
On Sun, 4 Jan 2004 21:20:52 +0100
"Urs Gehrig" <urs@circle.ch> wrote:
> hello
>
> did you know that there is already an sqlite db wrapper in PEAR;
> wouldn't it make sense to base Log_sqlite on DB/sqlite too?
>
> to create a table is as simple as (untested):
>
> <?php
> require_once 'DB.php';
> require_once 'DB/sqlite.php';
> $db = DB::connect("sqlite://dummy:@localhost/log.db" );
> $db->query("CREATE TABLE log_table ( id INTEGER PRIMARY KEY NOT NULL,
> logtime NOT NULL, ident CHAR(16) NOT NULL, priority INT NOT NULL,
> message );" );
> $db->disconnect();
> ?>
A DB backend makes sense. However a pure sqlite backend is
wonderfull. Fast, small, and so on :).
pierre