SQLite interface in php and SQLitephp Interface
Sqlite is a lightweight embedded database, which is different from SQL, why it is needed, and how its application database is processed. SQLite is a software database that provides a self-sufficiency, serverless, zero-configuration, and transactional SQL database engine. SQLite is the fastest growing database engine, which is growing in popularity and has nothing to do with its size.
For installation instructions, see Sqlite installation.
Create a database: sqlite3 d: \ sqlite \ test. db (command + path + Table name)
Create table: create table test_tab (id int). You can use. tables to view the table.
Insert data: insert into test_tab values (), similar to Mysql syntax
SQLite and PHP interface methods:
// Connect to the database if the database file does not exist, a database file filename can be created with en': memeory ', that is, there is public void SQLite3: open (filename, flags, encrypt_key) in the memory) // execute the SQL command public bool SQLite3: exec (string $ query) // query command public SQLite3Result SQLite3: query (string $ query) // return the error message public string SQLite3:: lastErroryMsg () // close the database public bool SQLite3: close () // return the number of rows of the last modification (Update, insert, delete) database public int SQLite3: changes ()