Skip to content

Instantly share code, notes, and snippets.

@mattattui
Created March 21, 2011 10:28
Show Gist options
  • Save mattattui/879267 to your computer and use it in GitHub Desktop.
Save mattattui/879267 to your computer and use it in GitHub Desktop.
Brief PDO prepared statement snippet
<?php
$query = 'SELECT * FROM my_table WHERE title = :title';
$stmt = $db->prepare($query);
$stmt->bindValue(':title', $title);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment