The point of this is to do whatever sanitizing/validation is done with a single variable/bindParam.
Using 3 variables causes an error.
I found THIS online :
$calories = 150;
$colour = 'red';
$sth = $dbh->prepare('SELECT name, colour, calories
FROM fruit
WHERE calories < ? AND colour = ?');
$sth->bindParam(1, $calories, PDO::PARAM_INT);
$sth->bindParam(2, $colour, PDO::PARAM_STR, 12);
$sth->execute();
Possible to add order numbers to the existing code?
As in :
$rsShowingsTour->bindParam(1, "i", "".(isset($_GET['id'])?$_GET['id']:"") ."", "-1"); //colname
And then modify the following somehow?
public function bindParam($paramType,$paramValue,$paramDefault="",$paramPosition=false) {
I found this as well :
// A. You can either do one parameter at a time or pass an array to execute().
—$STM->bindParam(":op", "twitter", PDO::PARAM_STR);
—$STM->bindParam(":ou", $user_info->id, PDO::PARAM_INT);
//Or B.
—execute(array(":op"=>"twitter", ":ou"=>$user_info->id));
Thanks!