Changeset 3754:c16c1cadbae6
- Timestamp:
- 04/30/18 19:00:50 (6 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgsubstate
r3739 r3754 1 9d97ea606a4f9a171dfe161c976afda0d524a6d2inc/libs/clearbricks1 ecff2984fb18c7e52f787299d0e78764513bc155 inc/libs/clearbricks -
inc/core/class.dc.sql.statement.php
r3749 r3754 142 142 $this->from = array(); 143 143 } 144 // Remove comma on beginning of clause(s) (legacy code) 144 145 if (is_array($c)) { 145 146 $filter = function ($v) { … … 282 283 public function regexp($value) 283 284 { 284 if ($this->con-> driver() == 'mysql' || $this->con->driver() == 'mysqli' || $this->con->driver() == 'mysqlimb4') {285 if ($this->con->syntax() == 'mysql') { 285 286 $clause = "REGEXP '^" . $this->escape(preg_quote($value)) . "[0-9]+$'"; 286 } elseif ($this->con-> driver() == 'pgsql') {287 } elseif ($this->con->syntax() == 'postgresql') { 287 288 $clause = "~ '^" . $this->escape(preg_quote($value)) . "[0-9]+$'"; 288 289 } else { 289 290 $clause = "LIKE '" . 290 $ sql->escape(preg_replace(array('%', '_', '!'), array('!%', '!_', '!!'), $value)) .291 $this->escape(preg_replace(array('%', '_', '!'), array('!%', '!_', '!!'), $value)) . 291 292 "%' ESCAPE '!'"; 292 293 } … … 300 301 * 301 302 * if (!$sql->isSame($sql->statement(), $oldRequest)) { 302 * trigger_error('SQL statement error: ' . $sql->statement() . ' / ' .$oldRequest, E_USER_ERROR);303 * trigger_error('SQL statement error: ' . $sql->statement() . ' / ' . $oldRequest, E_USER_ERROR); 303 304 * } 304 305 *
Note: See TracChangeset
for help on using the changeset viewer.