0

I am interested in using a SQLite database in my next project because it needs to be ultra-portable and a simple file that a class can connect to and use as a database seems perfect.

After Google'ing a bit I found this: http://php.net/manual/en/book.sqlite.php

But that seems to work with an older version of SQLite and doesn't seem to be reccomended. Does anyone know what class or functions etc I should be using to use an SQLite database? I plan to write my own class for interfacing with the database, so preferably just some functions like in the link I posted but with the up-to-date version of SQLite.

Any help is appreciated, thanks.

2 Answers 2

1

PDO seems your best bet.

From here:

If you intend to use SQLite 3.x releases of SQLite with your development please refer to the section on PHP Data Objects, and specifically the PDO-SQLite implementation available at(references: http://us.php.net/manual/en/book.pdo.php , https://www.php.net/manual/en/ref.pdo-sqlite.php).

PDO SQLite functions manual

Update: As @Joe mentions, there is also a standalone SQLite 3 class.

Sign up to request clarification or add additional context in comments.

Comments

0

theres nothing wrong with those sqlite function, you can use them. however there is sqlite3 http://www.php.net/manual/en/book.sqlite3.php which is object orientated. what i personally would suggest is the adodb wrapper which can easily port to any database and is very reliable at http://de.wikipedia.org/wiki/ADOdb

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.