P. 1
SQLITE Php Pdo Referance

SQLITE Php Pdo Referance

|Views: 797|Likes:
Published by jwzumwalt
SQLite Reference - Using PHP & PDO
SQLite Reference - Using PHP & PDO

More info:

Published by: jwzumwalt on Mar 02, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/26/2015

pdf

text

original

If you get an error reporting "invalid resource" when attempting a query on a database table and looping through it,
the version of the SQLite extension compiled in to PHP might be incompatible with the version that was used to
create the database (like SQLite 2.x vs 3.x).

The database might open (connect) ok, but will fail when querying.

$db = new PDO('sqlite:/tmp/foo.db'); // success
foreach ($db‐>query('SELECT * FROM bar') as $row) // prints invalid resource

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->