Hi. I have tried to use the prepare and execute on a sample table of people. This should returm to people with first name Bruce. Not sure what this bindParam is all about. Picked it up on an IBM PDO web site.
<?
$pdo = connectDB();
$Name = "Bruce";
$sql= ("SELECT * FROM PDO WHERE Name_F = ?"); // $Name goes here
$stmt = $pdo->prepare($sql);
// $stmt->bindParam(1, $Name);
$stmt->execute($Name);
while ($row = $stmt->fetch())
{
echo $row['Name_F'] . " - " . $row['Name_S'] . " -
Hi. I have tried to use the prepare and execute on a sample table of people. This should returm to people with first name Bruce. Not sure what this bindParam is all about. Picked it up on an IBM PDO web site.
<?
$pdo = connectDB();
$Name = "Bruce";
$sql= ("SELECT * FROM PDO WHERE Name_F = ?"); // $Name goes here
$stmt = $pdo->prepare($sql);
// $stmt->bindParam(1, $Name);
$stmt->execute($Name);
while ($row = $stmt->fetch())
{
echo $row['Name_F'] . " - " . $row['Name_S'] . " -