Пример #1
0
 protected function set_var($parameter)
 {
     if ($parameter === null) {
         return 'NULL';
     } elseif (is_array($parameter)) {
         $nb_value = count($parameter);
         for ($i = 0; $i < $nb_value; $i++) {
             $parameter[$i] = '\'' . $this->querier->escape($parameter[$i]) . '\'';
         }
         return '(' . implode(', ', $parameter) . ')';
     } elseif (is_string($parameter)) {
         return '\'' . $this->querier->escape($parameter) . '\'';
     } else {
         return $parameter;
     }
 }
Пример #2
0
 public function __construct(DBConnection $connection, SQLQueryTranslator $translator)
 {
     parent::__construct($connection, $translator);
     $this->query_var_replacator = new SQLQueryVars($this);
 }