[Solar-talk] SQLite Adapter

Michael Caplan mcaplan at labnet.net
Tue Sep 26 06:37:49 PDT 2006


Hi Paul,
 
Yes, swapping out file for name does the trick.  I opened a ticket in track with regard to this.  i guess the bookmark app should be changed to reflect this.
 
Best,
 
Michael

________________________________

From: solar-talk-bounces at lists.solarphp.com on behalf of Paul M Jones
Sent: Tue 9/26/2006 7:31 AM
To: solar-talk at lists.solarphp.com
Subject: Re: [Solar-talk] SQLite Adapter




On Sep 25, 2006, at 2:42 PM, Michael Caplan wrote:

> Hey there,
>
> I'm wondering if this is a bug, but I cannot get a valid DSN built 
> for sqlite.  Using the Bookmarks app example, I have the following 
> config entry:
>
> $config['Solar_Sql'] >  'adapter' => 'Solar_Sql_Adapter_Sqlite',
>  'config'  => array(
>      'file'   => LABNET_DB,
>      'mode'   => '0666',
>  )
> );
>
> where LABNET_DB is a constant holding the absolute path to the db.
>
> The resulting dsn is:
>
> sqlite:
>
> which of course is not valid.  Am I missing something here?

Try 'name' instead of 'file', let me know if that works.

One of the things I've tried to do is keep the config keys the same 
across SQL adapters; in general, the keys are:

     host -- hostname to connect to
     user -- username for connection
     pass -- password for connection
     name -- database name

So in the case of SQLite, the host is always the localhost, and the 
name would be the file name.  Hope this makes sense.

Also, per the PDO-SQLite docs, the "mode" parameter appears to be 
ignored ...

   <http://us2.php.net/manual/en/ref.pdo-sqlite.connection.php>

... at least, it is entirely unmentioned.

Hope this helps, let me know if it does not.


--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.   <http://solarphp.com>

Savant: The simple, elegant, and powerful solution for
templates in PHP.   <http://phpsavant.com>


_______________________________________________
solar-talk mailing list
solar-talk at lists.solarphp.com
http://mail.killersoft.com/mailman/listinfo/solar-talk







E-Mail messages may contain viruses, worms, or other malicious code. By reading the message and opening any attachments, the recipient accepts full responsibility for taking protective action against such code. Sender is not liable for any loss or damage arising from this message.

The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee(s). Access to this e-mail by anyone else is unauthorized.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5900 bytes
Desc: not available
Url : http://mail.killersoft.com/pipermail/solar-talk/attachments/20060926/94994192/attachment-0001.bin 


More information about the solar-talk mailing list