mirror of
https://github.com/dg/dibi.git
synced 2025-08-02 12:21:06 +02:00
DibiEvent: (SELECT ...) UNION (SELECT ...) is classified as SELECT [Closes #35]
This commit is contained in:
@@ -62,7 +62,7 @@ class DibiEvent
|
|||||||
$this->sql = trim($sql);
|
$this->sql = trim($sql);
|
||||||
$this->time = -microtime(TRUE);
|
$this->time = -microtime(TRUE);
|
||||||
|
|
||||||
if ($type === self::QUERY && preg_match('#(SELECT|UPDATE|INSERT|DELETE)#iA', $this->sql, $matches)) {
|
if ($type === self::QUERY && preg_match('#\(?\s*(SELECT|UPDATE|INSERT|DELETE)#iA', $this->sql, $matches)) {
|
||||||
static $types = array(
|
static $types = array(
|
||||||
'SELECT' => self::SELECT, 'UPDATE' => self::UPDATE,
|
'SELECT' => self::SELECT, 'UPDATE' => self::UPDATE,
|
||||||
'INSERT' => self::INSERT, 'DELETE' => self::DELETE,
|
'INSERT' => self::INSERT, 'DELETE' => self::DELETE,
|
||||||
|
Reference in New Issue
Block a user