skip to Main Content

PDO with bindParam() returns syntax error – Phpmyadmin

I'm doing a PDO UPDATE query to MariaDB database. $query = "UPDATE :table SET `name`=:name, `title`=:title, `description`=:description WHERE id=:id"; $stmt = $this->conn->prepare($query); $stmt->bindParam(':table',$this->table, PDO::PARAM_STR); $stmt->bindParam(':id',$this->id, PDO::PARAM_INT); $stmt->bindParam(':name',$this->name, PDO::PARAM_STR); $stmt->bindParam(':title',$this->title, PDO::PARAM_STR); $stmt->bindParam(':description',$this->description, PDO::PARAM_STR); $stmt->execute(); It seems to me that everything is…

VIEW QUESTION
Back To Top
Search