SQLite interface in php and SQLitephp Interface

Source: Internet
Author: User

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 ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.