What is the difference between:
$db = new SQLiteDatabase('name.db');
and
$db = new PDO('sqlite:name.db');
Since, I don’t understand the big picture here, details are premature for me and the information available online appears to assume certain knowledge I seem to be lacking. Please don’t just paste in links to the PHP manual. Less specific, more general concepts will be useful for me.
Also, do both of these approaches use SQLite 3, as opposed to SQLite 2?
Directly using the SQLite functions/classes, your PHP code will only be compatible with SQLIte.
Using PDO, your PHP code will be compatible with many database systems — see PDO Drivers for a list of existing drivers.
Quoting the Introduction page of PDO :
This abstraction layer can be useful if you want your code to be compatible with more than one DB engine ; but note that :
For the question about SQLite and SQLite3 :