Пример #1
0
 public function selectAll()
 {
     $this->pdo->beginTransaction();
     $sth = $this->pdo->query("SELECT * FROM {$this->prefix}orders");
     $data = $sth->fetchAll(PDO::FETCH_ASSOC);
     $this->pdo->commit();
     return $data;
 }
Пример #2
0
 /**
  *
  * Удалить запись с кэшем
  *
  * @param $sig
  *
  * @return bool
  */
 public function remove($sig)
 {
     $query = 'DELETE FROM ' . $this->prefix . 'cache WHERE sig = ":sig"';
     $sth = $this->pdo->prepare($query);
     $sth->bindParam(':sig', $sig);
     if ($sth->execute()) {
         $result = true;
     } else {
         $result = false;
     }
     return $result;
 }