Esempio n. 1
0
 public function querySql($sql, $messageError)
 {
     $result = \Meta\Core\Db::query(Builder::replaceSQL($sql))->fetchColumn();
     if (!$result) {
         $this->error = $messageError;
     }
     return $result;
 }
Esempio n. 2
0
 protected function fetchFromSql($sql)
 {
     if (isset($_GET['id'])) {
         $row = Db::query(Builder::replaceSQL($sql))->fetch(\PDO::FETCH_ASSOC);
         if ($this->context instanceof \Meta\Builder\Object\Form) {
             $this->context->setData($row);
         }
     }
     return true;
 }