Skip to content

Instantly share code, notes, and snippets.

@Albert221
Last active January 10, 2017 21:55

Revisions

  1. Albert221 revised this gist Jan 10, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions pdo-exec.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <?php

    $pdo = new PDO(...);

    $pdo->exec('CREATE TABLE users(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL) ENGINE=InnoDB');
  2. Albert221 created this gist Jan 10, 2017.
    3 changes: 3 additions & 0 deletions pdo-exec.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    <?php

    $pdo->exec('CREATE TABLE users(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL) ENGINE=InnoDB');