View Single Post
Old 12-31-2012, 07:41 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
The value, as in country?
PHP Code:
if ($stmt $pdo->prepare('SELECT count(*) FROM test WHERE Country = :country'))
{
    
$stmt->execute(array(':country' => $_GET['Country']));
    
$count $stmt->fetchAll();

Unless you mean dynamic userchosen as the properties to fetch, then the answer is no you cannot use binding for that (you cannot create a dynamic structure on a prepared statement).
Fou-Lu is offline   Reply With Quote