Beispiel #1
0
 public function updatejob($id, $qixian, $renshu, $yaoqiu, $zhiwei)
 {
     $db = Dbclass::getDB();
     $query = "UPDATE zhaoadd\n                    SET qixian = :cat,\n                    renshu = :code,\n                    yaoqiu = :name,\n                    zhiwei = :job\n                      WHERE ID = :id ";
     $stm = $db->prepare($query);
     $stm->bindParam(':id', $id);
     $stm->bindParam(':cat', $category, PDO::PARAM_STR, 50);
     $stm->bindParam(':code', $code, PDO::PARAM_STR, 50);
     $stm->bindParam(':name', $name, PDO::PARAM_STR, 200);
     $stm->bindParam(':job', $price, PDO::PARAM_INT);
     $count = $stm->execute();
     return "Updated rows: " . $count;
 }
 public function updatejob($id, $username, $phone, $email, $address, $message)
 {
     $db = Dbclass::getDB();
     $query = "UPDATE feedback\n                    SET username = :cat,\n                    phone = :code,\n                    email = :name,\n                    address = :job,\n                    message=:msg\n                      WHERE ID = :id ";
     $stm = $db->prepare($query);
     $stm->bindParam(':id', $id);
     $stm->bindParam(':cat', $username, PDO::PARAM_STR, 50);
     $stm->bindParam(':code', $phone, PDO::PARAM_STR, 50);
     $stm->bindParam(':name', $email, PDO::PARAM_STR, 50);
     $stm->bindParam(':job', $address, PDO::PARAM_INT);
     $stm->bindParam(':msg', $message, PDO::PARAM_STR, 200);
     $count = $stm->execute();
     return "Updated rows: " . $count;
 }