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 sequence returns the result of adding all given values to the sequencephp set returns the result of adding all given values to the setphp frontbase 函数 get the status for a given databasephp maxdb 函数 transfers a result set from the last queryphp sqlite 函数 execute a query against a given database and returns an arrayphp sqlite 函数 executes a result less query against a given databasephp sqlite 函数 fetches the next row from a result set as an objectphp sqlite 函数 opens a persistent handle to an sqlite database and create the database if it does not existphp sqlite 函数 seek to the previous row number of a result setphp 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 mongocommandcursor executes the command and resets the cursor to the start of the result setphp mysqli returns the number of warnings from the last query for the given linkphp mysqlnduhconnection performs a query on the databasephp sdo das relational 函数 executes an sql query passed as a prepared statement with a list of values to substitute for placeholders and return the results as a normalised data graphphp 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 sqlite3stmt executes a prepared statement and returns a result set object
关注编程学问公众号