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 domxpath evaluates the given xpath expression and returns a typed result if possiblephp map returns the result of adding all given associationsphp cubrid 函数 get result of next query when executing multiple sql statementsphp ibm db2 函数 returns a result set listing the tables and associated metadata in a databasephp dbx 函数 fetches rows from a query result that had the dbx result unbuffered flag setphp maxdb 函数 executes a prepared queryphp maxdb 函数 frees stored result memory for the given statement handlephp maxdb 函数 returns the number of warnings from the last query for the given linkphp sqlite 函数 execute a query against a given database and returns an arrayphp sqlite 函数 closes an open sqlite databasephp sqlite 函数 fetches a column from the current row of a result setphp 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 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 name of the nth columnphp sqlite3stmt executes a prepared statement and returns a result set object
关注编程学问公众号