Lines Matching refs:this

38         $this->_debug = $debug;
39 $this->util =& plugin_load('helper', 'strata_util');
64 * Preferably, this syntax should allow % as a wildcard (e.g. as done by LIKE).
80 $this->castToNumber($val),
81 $this->ci($val)
92 $this->_dsn = $dsn;
94 $this->_db = $this->initializePDO($dsn);
96 if ($this->_debug) {
97 msg(sprintf($this->util->getLang('driver_failed_detail'), hsc($dsn), hsc($e->getMessage())), -1);
99 msg($this->util->getLang('driver_failed'), -1);
103 $this->initializeConnection();
143 if($this->_db == false) return false;
146 list($driver, $connection) = explode(':', $this->_dsn, 2);
147 if ($this->_debug) msg(sprintf($this->util->getLang('driver_setup_start'), hsc($driver)));
156 // (this makes sure that a semicolon in the comment doesn't break the script)
169 $this->beginTransaction();
174 if ($this->_debug) msg(sprintf($this->util->getLang('driver_setup_statement'),hsc($s)));
175 if(!$this->query($s, $this->util->getLang('driver_setup_failed'))) {
176 $this->rollBack();
180 $this->commit();
182 if($this->_debug) msg($this->util->getLang('driver_setup_succes'), 1);
193 return $this->query('DROP TABLE data', $this->util->getLang('driver_remove_failed'));
203 if($this->_db == false) return false;
205 $result = $this->_db->prepare($query);
207 $error = $this->_db->errorInfo();
208 msg(sprintf($this->util->getLang('driver_prepare_failed'),hsc($query), hsc($error[2])),-1);
223 if($this->_db == false) return false;
226 $message = $this->util->getLang('driver_query_failed_default');
229 $res = $this->_db->query($query);
231 $error = $this->_db->errorInfo();
232 msg(sprintf($this->utiutil->getLang('driver_query_failed'), $message, hsc($query), hsc($error[2])),-1);
242 return "t".$this->transactionCount++;
249 if($this->_db == false) return false;
251 if(count($this->transactions)) {
252 $t = $this->_transactionId();
253 array_push($this->transactions, $t);
254 $this->_db->query('SAVEPOINT '.$t.';');
257 array_push($this->transactions, 'work');
258 return $this->_db->beginTransaction();
266 if($this->_db == false) return false;
268 array_pop($this->transactions);
269 if(count($this->transactions)) {
272 return $this->_db->commit();
280 if($this->_db == false) return false;
282 $t = array_pop($this->transactions);
283 if(count($this->transactions)) {
284 $this->_db->query('ROLLBACK TO '.$t.';');
287 return $this->_db->rollBack();