You are here: Re: SQLite Version 2.1? « PHP Programming Language « IT news, forums, messages
Re: SQLite Version 2.1?

Posted by Jim Carlock on 01/26/07 06:51

"Andy Hassall" <andy@andyh.co.uk> posted...
: Possibly just to add to the confusion, it appears that php_pdo_sqlite.dll
: is linked against SQLite 3.x, but php_sqlite.dll is linked against 2.x:

Yes, that's exactly what I see. The first characters of the data files, when
viewed with a hex viewer identify the versions. Specifically, here's what
I see...

"** This file contains an SQLite 2.1 database **"
"SQLite format 3"

The syntax to create the version 3 file...

$sDSN = "sqlite:./test/test.db";
$sSQL = "CREATE TABLE tNames(name_first text, name_last text);";
$sUserName = "myname";
$sPW = "My321Goofy123Password";
$hPDO = new PDO($sDSN, $sUserName, $sPW);
$hPDO->exec($sSQL);
$hPDO = null;

The above created the table in the appropriate folder with two fields,
as expected.

I got into the data file using the SQLite Database Browser, from here,
http://sqlitebrowser.sourceforge.net/, and view the internals of the file
created by the above statements. However, I noticed it didn't require
a username nor password to get into the file and add new data to the
file. I'm missing out on something as far getting a userid and password to
work for the file.

Thanks for your comments, Andy.

--
Jim Carlock
Post replies to the group.
http://www.microcosmotalk.com/tech/windows/php/sqlite

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация