我有這個功能。Php - PDO - 解析錯誤:語法錯誤,意外''。'
public function selection($table, $condition_var,$condition_val)
{
if ($condition_var != '') {
$stm = $this->dbh->prepare("SELECT * FROM " . $table . " WHERE " . $condition_var=.":".$condition_var. " ");
$stm->bindParam(":".$condition_var, $condition_val);
return $stm->execute();
}
}
我正在這裏在這下面一行
$stm = $this->dbh->prepare("SELECT * FROM " . $table . " WHERE " . $condition_var=.":".$condition_var. " ");
不知道我在做什麼錯在這裏。好心請
流氓'='在'$ condition_var =「' – Wrikken 2014-12-04 19:39:37
我真的很希望所有這些輸入參數都經過精心限制的 – tadman 2014-12-04 20:44:11
是 – hellosheikh 2014-12-04 20:55:49