SQLite3::exec

(PHP 5 >= 5.3.0, PHP 7)

SQLite3::execExecutes a result-less query against a given database

说明

public SQLite3::exec ( string $query ) : bool

Executes a result-less query against a given database.

Note: SQLite3 may need to create » temporary files during the execution of queries, so the respective directories may have to be writable.

参数

query

The SQL query to execute (typically an INSERT, UPDATE, or DELETE query).

返回值

Returns TRUE if the query succeeded, FALSE on failure.

范例

Example #1 SQLite3::exec() example

<?php
$db 
= new SQLite3('mysqlitedb.db');

$db->exec('CREATE TABLE bar (bar STRING)');
?>

相关文章
php mysql mysqlnd query result cache pluginphp vector returns the result of adding all given values to the vectorphp postgresql 函数 sends a request to execute a prepared statement with given parameters and waits for the resultphp sqlite 函数 execute a query against a given database and returns an arrayphp sqlite 函数 fetches the current row from a result set as an arrayphp sqlite 函数 executes a result less query against a given databasephp sqlite 函数 executes a query against a given database and returns a result handlephp sqlite 函数 executes a query and returns either an array for one single column or the value of the first rowphp mongodb driver server execute a database query on this serverphp mysqlnduhconnection returns the number of warnings from the last query for the given linkphp sdo das relational 函数 executes a given sql query against a relational database and returns the results as a normalised data graphphp solrclient deletes all documents matching the given queryphp sqlite3 executes a result less query against a given databasephp sqlite3 returns the numeric result code of the most recent failed sqlite requestphp sqlite3 executes an sql queryphp sqlite3 executes a query and returns a single resultphp sqlite3result fetches a result row as an associative or numerically indexed array or bothphp sqlite3result closes the result setphp sqlite3result returns the number of columns in the result setphp sqlite3stmt executes a prepared statement and returns a result set object
关注编程学问公众号