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 ingres 函数 get a cursor name for a given result resourcephp ingres 函数 get the type of a field in a query resultphp oci8 函数 returns the next child statement resource from a parent statement resource that has oracle database 12c implicit result setsphp socket 函数 queries the local side of the given socket which may either result in host/port or in a unix filesystem path dependent on its typephp 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 函数 returns the error code of the last error for a 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 sqlite 函数 execute a query that does not prefetch and buffer all dataphp mysqlnduhpreparedstatement executes a prepared queryphp sdo das relational 函数 executes a given sql query against a relational database and returns the results as a normalised data graphphp sqlite3 executes a result less query against a given databasephp sqlite3 executes an sql queryphp sqlite3 executes a query and returns a single resultphp sqlite3result returns the type of the nth columnphp sqlite3result fetches a result row as an associative or numerically indexed array or bothphp sqlite3stmt executes a prepared statement and returns a result set object
关注编程学问公众号