Beispiel #1
0
 function deleteCar($id)
 {
     try {
         $connection = new DBconnection("cars");
         $db = $connection->getDb();
         $stmt = $db->prepare("DELETE FROM tbl_car\n\t\t\t\t\t\t\t\t\t\tWHERE auto_id = ?");
         $stmt->bindValue(1, $id, PDO::PARAM_INT);
         $stmt->execute();
         return "SUCCESS";
     } catch (PDOException $ex) {
         return "<p>ERROR: " . $ex->getMessage() . "</p>";
     }
 }