@@ 188-191 (lines=4) @@ | ||
185 | ||
186 | // Check if we can match the query against any of the major types |
|
187 | switch (true) { |
|
188 | case stripos($query, 'SELECT') !== false: |
|
189 | $keywords = ['SELECT', 'FROM', 'WHERE', 'HAVING', 'ORDER BY', 'LIMIT']; |
|
190 | $required = 2; |
|
191 | break; |
|
192 | ||
193 | case stripos($query, 'DELETE') !== false: |
|
194 | $keywords = ['DELETE', 'FROM', 'WHERE', 'ORDER BY', 'LIMIT']; |
|
@@ 193-196 (lines=4) @@ | ||
190 | $required = 2; |
|
191 | break; |
|
192 | ||
193 | case stripos($query, 'DELETE') !== false: |
|
194 | $keywords = ['DELETE', 'FROM', 'WHERE', 'ORDER BY', 'LIMIT']; |
|
195 | $required = 2; |
|
196 | break; |
|
197 | ||
198 | case stripos($query, 'UPDATE') !== false: |
|
199 | $keywords = ['UPDATE', 'SET', 'WHERE', 'ORDER BY', 'LIMIT']; |
|
@@ 198-201 (lines=4) @@ | ||
195 | $required = 2; |
|
196 | break; |
|
197 | ||
198 | case stripos($query, 'UPDATE') !== false: |
|
199 | $keywords = ['UPDATE', 'SET', 'WHERE', 'ORDER BY', 'LIMIT']; |
|
200 | $required = 2; |
|
201 | break; |
|
202 | ||
203 | case stripos($query, 'INSERT') !== false: |
|
204 | $keywords = ['INSERT', 'INTO', 'VALUE', 'VALUES']; |
|
@@ 203-206 (lines=4) @@ | ||
200 | $required = 2; |
|
201 | break; |
|
202 | ||
203 | case stripos($query, 'INSERT') !== false: |
|
204 | $keywords = ['INSERT', 'INTO', 'VALUE', 'VALUES']; |
|
205 | $required = 2; |
|
206 | break; |
|
207 | ||
208 | // If there's no match so far just truncate it to the maximum allowed by the interface |
|
209 | default: |