Ejemplo n.º 1
0
 public function deleteAllById(array $ids)
 {
     $result = false;
     $prep = '';
     $bind = [];
     try {
         for ($i = 0; $i < count($ids); $i++) {
             if (!empty($prep)) {
                 $prep .= " OR ";
             }
             $prep .= "id = :id{$i}";
             $bind[":id{$i}"] = $ids[$i];
         }
         $result = $this->connect->delete($this->tableName, $prep, $bind);
         if ($result) {
             $result = $result->rowCount();
         }
     } catch (\AbstractDriverException $error) {
     }
     return $result;
 }
Ejemplo n.º 2
0
 public function delete($where, $and = NULL)
 {
     $message = $this->connect->delete($this->tableName, $where . ' AND ' . $and);
     return $message;
 }