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; }
/** * * Удалить запись с кэшем * * @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; }