query
执行sql语句
query($query)
query [string]
The SQL query.
Return: [object] The PDOStatement object.
此方法用于使用复杂的SQL语句,SQL注入问题请参考quote方法
$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);