Skip to content

Instantly share code, notes, and snippets.

@linroex
Created April 26, 2015 16:41
Show Gist options
  • Save linroex/46b77db63e1b246d5703 to your computer and use it in GitHub Desktop.
Save linroex/46b77db63e1b246d5703 to your computer and use it in GitHub Desktop.
<?php
$conn = new PDO("mysql:host=127.0.0.1;dbname=rfid;", "root", "");
$cursor = $conn->prepare("select * from :table ;");
$cursor->execute([":table"=>"contrast"]);
var_dump($cursor->fetch());
// var_dump($cursor);
// var_dump($conn->query("select * from contrast")->fetch());
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment