[resolved] How to enable hightlight to sql with operator "WITH" (SQL) ?

Hightlight is ok:

$db->get_results('
SELECT
*
FROM `my_table`
');

Hightlight is not working:

$db->get_results('
WITH tmp AS (
SELECT
*
FROM `my_table`
)
##...
');

Operator "WITH" not supported ? Any fix ?

0
2 comments
Avatar
Permanently deleted user

DB console is recognize operator "WITH" and works fine.

0
Avatar
Permanently deleted user

Resolved.

Settings|Editor|Language injections|php:"SQL select/delete/...

set Places Patterns:

+ and(not(phpLiteralExpression("DQL")), phpLiteralMatchesBrics(" *(((SELECT|DELETE) .*FROM)|((INSERT|REPLACE) .*INTO)|(WITH .*AS ~(.*[A-Za-z_][A-Za-z0-9_]*(\\\\|:)[A-Za-z_].*))|(UPDATE ~(.*[A-Za-z_][A-Za-z0-9_]*(\\\\|:)[A-Za-z_].*) SET)|((CREATE|DROP|ALTER) +((TEMPORARY )?TABLE|(UNIQUE )?INDEX))) ~(.*[A-Za-z_][A-Za-z0-9_]*(\\\\|:)[A-Za-z_].*)"))

add "with" to name and use!

1

Please sign in to leave a comment.