Anybody wish to help me with a pattern for the PHP language bundle? I have embedded SQL under a variable such as below. I'm having trouble excluding the addslashes part from the scope.
$sql = "WHERE category = '" . addslashes($category) . "'";
...or...
$qid = DB::query(" WHERE category = '" . addslashes($category) . "' ");
The pattern I've come up with so far:
{ name = 'meta.scope.sql'; begin = '(dbQuery|DB::query)("|$\w*(sql|where)\w*\s*=\s*"'; end = '")|";'; patterns = ( { include = 'source.sql'; }, ); contentName = 'source.sql.embedded'; },
I'm new at this so any help would be appreciated.
Thanks, Quinn