Display the drop-down list

PDO::exec()

« PDO::errorInfo | PDO::getAttribute »
<?php
$pdo 
= new PDO("sqlite::memory:"nullnull, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);

$int $pdo->exec (
    
  // string $statement
);
?>
Result
$pdo = 'PDO instance'
$int = 7
Examples
#1 PDO::exec  ("CREATE TABLE fruit (name, color, calories); INSERT INTO fruit VALUES ('apple', 'red', 150), ('banana', 'yellow', 250), ('kiwi', 'brown', 75), ('lemon', 'yellow', 25), ('orange', 'orange', 300), ('pear', 'green', 150), ('watermelon', 'pink', 90)")
#2 PDO::exec  ("CREATE TABLE fruit (name, color, calories); INSERT INTO fruit VALUES ('apple', 'red', 150), ('banana', 'yellow', 250); UPDATE fruit SET name = 'pear' WHERE name = 'apple'")
#3 PDO::exec  ("CREATE TABLE bad ()")
See also
PDO::prepare, PDO::query, PDOStatement::execute