PHP 接口API
以下是重要的PHP程序,就足夠完成工作要求從PHP程序使用SQLite數據庫。如果要找一個更複雜的應用程序,那麼你可以看看到PHP官方文件。
S.N. API & 描述
1 public void SQLite3::open ( filename, flags, encryption_key )
打開一個SQLite3數據庫。如果構建包括加密,然後它會試圖使用密鑰。
If the filename is given as ':memory:', SQLite3::open() will create an in-memory database in RAM that lasts only for the duration of the session.
If filename is actual device file name, SQLite3::open() attempts to open the database file by using its value. If no file by that name exists then a new database file by that name gets created.
Optional flags used to determine how to open the SQLite database. By default, open uses SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE.
2 public bool SQLite3::exec ( string $query )
This routine provides a quick, easy way to execute SQL commands provided by sql argument which can consist of more than one SQL command. This routine is used to execute a result-less query against a given database.
3 public SQLite3Result SQLite3::query ( string $query )
This routine executes an SQL query, returning an SQLite3Result object if the query returns results.
4 public int SQLite3::lastErrorCode ( void )
This routine returns the numeric result code of the most recent failed SQLite request
5 public string SQLite3::lastErrorMsg ( void )
This routine returns english text describing the most recent failed SQLite request.
6 public int SQLite3::changes ( void )
This routine returns the number of database rows that were updated or inserted or deleted by the most recent SQL statement
7 public bool SQLite3::close ( void )
This routine closes a database connection previously opened by a call to SQLite3::open().
8 public string SQLite3::escapeString ( string $value )
This routine returns a string that has been properly escaped for safe inclusion in an SQL statement.
歡迎光臨 TShopping (http://www.tshopping.com.tw/) | Powered by Discuz! X3.2 |