<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: PHP 5, Sqlite, and Windows</title>
	<atom:link href="http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/</link>
	<description>Random stuff from some dude in Austin Texas</description>
	<pubDate>Sun, 05 Jul 2009 20:33:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Mike Kamermans</title>
		<link>http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/#comment-21020</link>
		<dc:creator>Mike Kamermans</dc:creator>
		<pubDate>Sun, 08 Feb 2009 21:22:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.turnofthecrank.com/2006/09/11/php-5-sqlite-and-windows/#comment-21020</guid>
		<description>Still relevant (bizarly), while PHP5 still lacks SQLite3 functionality, you can connect to any SQLite3 database by treating them as PDO objects instead:

$dbh = new PDO('sqlite:yourdbfile.db');
foreach($dbh-&#62;query('SELECT * FROM yourtable WHERE something=something') as $row)
{
  echo "\n";
  foreach($row as $key=&#62;$val)
    {
      // I'm sure there is a way to force PDO to return just as associative array, but I've not looked for it
      if(!is_numeric($key)) echo "$key$val\n";
    }
  echo "\n";
}
$dbh = null;</description>
		<content:encoded><![CDATA[<p>Still relevant (bizarly), while PHP5 still lacks SQLite3 functionality, you can connect to any SQLite3 database by treating them as PDO objects instead:</p>
<p>$dbh = new PDO(&#8217;sqlite:yourdbfile.db&#8217;);<br />
foreach($dbh-&gt;query(&#8217;SELECT * FROM yourtable WHERE something=something&#8217;) as $row)<br />
{<br />
  echo &#8220;\n&#8221;;<br />
  foreach($row as $key=&gt;$val)<br />
    {<br />
      // I&#8217;m sure there is a way to force PDO to return just as associative array, but I&#8217;ve not looked for it<br />
      if(!is_numeric($key)) echo &#8220;$key$val\n&#8221;;<br />
    }<br />
  echo &#8220;\n&#8221;;<br />
}<br />
$dbh = null;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ignacio Esviza</title>
		<link>http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/#comment-13789</link>
		<dc:creator>Ignacio Esviza</dc:creator>
		<pubDate>Sun, 09 Mar 2008 19:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.turnofthecrank.com/2006/09/11/php-5-sqlite-and-windows/#comment-13789</guid>
		<description>I just spend only 20 minutes to have PHP5 + SQLite 3 working smooth together. You must use PDO functions. The documentation is very clear on that. 

What you DON'T have is an sqlite3_* functions. You must to connect via PDO.</description>
		<content:encoded><![CDATA[<p>I just spend only 20 minutes to have PHP5 + SQLite 3 working smooth together. You must use PDO functions. The documentation is very clear on that. </p>
<p>What you DON&#8217;T have is an sqlite3_* functions. You must to connect via PDO.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul gorton</title>
		<link>http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/#comment-47</link>
		<dc:creator>paul gorton</dc:creator>
		<pubDate>Tue, 31 Oct 2006 00:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.turnofthecrank.com/2006/09/11/php-5-sqlite-and-windows/#comment-47</guid>
		<description>quote from : http://www.php.net/README_UPGRADE_51.php#db3

"
&lt;i&gt;11c. Changes in SQLite support

In PHP 5.0, SQLite 2 support was provided by the built-in sqlite extension, which was also available as a PECL extension in PHP 4.3 and PHP 4.4. With the introduction of PDO, the sqlite extension doubles up to act as a 'sqlite2' driver for PDO; it is due to this that the sqlite extension in PHP 5.1 has a dependency upon the PDO extension.

PHP 5.1 ships with a number of alternative interfaces to sqlite:

The sqlite extension provides the "classic" sqlite procedural/OO API that you may have used in prior versions of PHP. It also provides the PDO 'sqlite2' driver, which allows you to access legacy SQLite 2 databases using the PDO API.

PDO_SQLITE provides the 'sqlite' version 3 driver. SQLite version 3 is vastly superior to SQLite version 2, but the file formats of the two versions are not compatible.

If your SQLite-based project is already written and working against earlier PHP versions, then you can continue to use ext/sqlite without problems, but will need to explicitly enable both PDO and sqlite. New projects should use PDO and the 'sqlite' (version 3) driver, as this is faster than SQLite 2, has improved locking concurrency, and supports both prepared statements and binary columns natively.

You must enable PDO to use the SQLite extension. If you want to build the PDO extension as a shared extension, then the SQLite extension must also be built shared. The same holds true for any extension that provides a PDO driver &lt;/i&gt;
"

sorry to chock up your comments but this explains why they've kept the sqlite2 stuff in there. because the two versions of sqlite are not compatible, if they move wholesale to sqlite3 it would break a lot of scripts.</description>
		<content:encoded><![CDATA[<p>quote from : <a href="http://www.php.net/README_UPGRADE_51.php#db3" rel="nofollow">http://www.php.net/README_UPGRADE_51.php#db3</a></p>
<p>&#8221;<br />
<i>11c. Changes in SQLite support</p>
<p>In PHP 5.0, SQLite 2 support was provided by the built-in sqlite extension, which was also available as a PECL extension in PHP 4.3 and PHP 4.4. With the introduction of PDO, the sqlite extension doubles up to act as a &#8217;sqlite2&#8242; driver for PDO; it is due to this that the sqlite extension in PHP 5.1 has a dependency upon the PDO extension.</p>
<p>PHP 5.1 ships with a number of alternative interfaces to sqlite:</p>
<p>The sqlite extension provides the &#8220;classic&#8221; sqlite procedural/OO API that you may have used in prior versions of PHP. It also provides the PDO &#8217;sqlite2&#8242; driver, which allows you to access legacy SQLite 2 databases using the PDO API.</p>
<p>PDO_SQLITE provides the &#8217;sqlite&#8217; version 3 driver. SQLite version 3 is vastly superior to SQLite version 2, but the file formats of the two versions are not compatible.</p>
<p>If your SQLite-based project is already written and working against earlier PHP versions, then you can continue to use ext/sqlite without problems, but will need to explicitly enable both PDO and sqlite. New projects should use PDO and the &#8217;sqlite&#8217; (version 3) driver, as this is faster than SQLite 2, has improved locking concurrency, and supports both prepared statements and binary columns natively.</p>
<p>You must enable PDO to use the SQLite extension. If you want to build the PDO extension as a shared extension, then the SQLite extension must also be built shared. The same holds true for any extension that provides a PDO driver </i><br />
&#8221;</p>
<p>sorry to chock up your comments but this explains why they&#8217;ve kept the sqlite2 stuff in there. because the two versions of sqlite are not compatible, if they move wholesale to sqlite3 it would break a lot of scripts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpg</title>
		<link>http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/#comment-46</link>
		<dc:creator>jpg</dc:creator>
		<pubDate>Mon, 30 Oct 2006 23:50:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.turnofthecrank.com/2006/09/11/php-5-sqlite-and-windows/#comment-46</guid>
		<description>quote from : http://au.php.net/manual/en/ref.sqlite.php
"SQLite 3 is supported through PDO SQLite. "

http://au.php.net/manual/en/ref.pdo-sqlite.php

works fine for me. use the normal sqlite extension to open sqlite2 db's and the pdo_sqlite extension to open sqlite3 db's. i've had no problems using sqlite2 for the last couple years. but recently i've been using sqlite3 through pdo_sqlite.</description>
		<content:encoded><![CDATA[<p>quote from : <a href="http://au.php.net/manual/en/ref.sqlite.php" rel="nofollow">http://au.php.net/manual/en/ref.sqlite.php</a><br />
&#8220;SQLite 3 is supported through PDO SQLite. &#8221;</p>
<p><a href="http://au.php.net/manual/en/ref.pdo-sqlite.php" rel="nofollow">http://au.php.net/manual/en/ref.pdo-sqlite.php</a></p>
<p>works fine for me. use the normal sqlite extension to open sqlite2 db&#8217;s and the pdo_sqlite extension to open sqlite3 db&#8217;s. i&#8217;ve had no problems using sqlite2 for the last couple years. but recently i&#8217;ve been using sqlite3 through pdo_sqlite.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shane.sherman</title>
		<link>http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/#comment-33</link>
		<dc:creator>shane.sherman</dc:creator>
		<pubDate>Mon, 25 Sep 2006 16:13:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.turnofthecrank.com/2006/09/11/php-5-sqlite-and-windows/#comment-33</guid>
		<description>$db = new SQLiteDatabase("db.sqlite");  will create a database, then you just need to create the tables, etc.</description>
		<content:encoded><![CDATA[<p>$db = new SQLiteDatabase(&#8221;db.sqlite&#8221;);  will create a database, then you just need to create the tables, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP</title>
		<link>http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/#comment-32</link>
		<dc:creator>PHP</dc:creator>
		<pubDate>Mon, 25 Sep 2006 15:52:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.turnofthecrank.com/2006/09/11/php-5-sqlite-and-windows/#comment-32</guid>
		<description>How did you create the database, when there isn't a CREATE DATABASE command?</description>
		<content:encoded><![CDATA[<p>How did you create the database, when there isn&#8217;t a CREATE DATABASE command?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/#comment-30</link>
		<dc:creator>john</dc:creator>
		<pubDate>Wed, 13 Sep 2006 04:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.turnofthecrank.com/2006/09/11/php-5-sqlite-and-windows/#comment-30</guid>
		<description>Well the first problem you had with sqlite 3 with the "file encrypted" error relates to the need to use pdo with php 5.  But you are right that documentation and examples are not very good - I had major problems too, gave up on it, and went back to postgresql even for a small app.  

Too many PHP'ers are hung up on MySQL which is overkill for probably 80% of the apps.  But I still hope php sqlite support can get straightened out - sqlite offers great promise for most simple db apps.</description>
		<content:encoded><![CDATA[<p>Well the first problem you had with sqlite 3 with the &#8220;file encrypted&#8221; error relates to the need to use pdo with php 5.  But you are right that documentation and examples are not very good - I had major problems too, gave up on it, and went back to postgresql even for a small app.  </p>
<p>Too many PHP&#8217;ers are hung up on MySQL which is overkill for probably 80% of the apps.  But I still hope php sqlite support can get straightened out - sqlite offers great promise for most simple db apps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHPDeveloper.org</title>
		<link>http://www.shanesherman.com/2006/09/11/php-5-sqlite-and-windows/#comment-29</link>
		<dc:creator>PHPDeveloper.org</dc:creator>
		<pubDate>Tue, 12 Sep 2006 21:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.turnofthecrank.com/2006/09/11/php-5-sqlite-and-windows/#comment-29</guid>
		<description>&lt;strong&gt;Turn of the Crank: PHP 5, Sqlite, and Windows&lt;/strong&gt;

</description>
		<content:encoded><![CDATA[<p><strong>Turn of the Crank: PHP 5, Sqlite, and Windows</strong></p>
]]></content:encoded>
	</item>
</channel>
</rss>
