public function update($id, $name, $color, $weight, $picture) { try { $conn = Databases::getConnection(); $sql = "UPDATE product SET name=:name, color=:color, weight=:weight, 1, picture=:picture WHERE id=:id"; $stm = $conn->prepare($sql); $stm->bindParam(":id", $id); $stm->bindParam(":name", $name); $stm->bindParam(":color", $color); $stm->bindParam(":weight", $weight); $stm->bindParam(":picture", $picture); $ret = $stm->execute(); } catch (Exception $ex) { return; } }