Get Started

Where Syntax

Query

Transaction

Advanced

PDO object

Debug

Information

version: 1.1.3

query

Insert new records in a table

query($query)
Return: [object] The PDOStatement object.
This function is for special and customized SQL query that used for complex query. With each data that will be inserted, please use quote function to prevent SQL injection.
$database->query("CREATE TABLE table (
	c1 INT STORAGE DISK,
	c2 INT STORAGE MEMORY
) ENGINE NDB;");

$data = $database->query("SELECT email FROM account")->fetchAll();
print_r($data);