Skip to content

Instantly share code, notes, and snippets.

@shadowhand
Created April 8, 2009 23:03
Show Gist options
  • Save shadowhand/92110 to your computer and use it in GitHub Desktop.
Save shadowhand/92110 to your computer and use it in GitHub Desktop.
<?php
public function find_unique($value)
{
$sql = 'SELECT * FROM users WHERE username = :value OR email = :value LIMIT 1';
$query = DB::select($sql);
$query->execute(array(':value' => $value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment