We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2cee4c commit a93a220Copy full SHA for a93a220
1 file changed
lib_sql_parser.php
@@ -95,7 +95,27 @@ public function lex($sql){
95
# <national character string literal>
96
# <bit string literal>
97
# <hex string literal>
98
+
99
# <character string literal>
100
+ if ($sql[$pos] == "'" || $sql[$pos] == '"'){
101
+ $c = $pos+1;
102
+ $q = $sql[$pos];
103
+ while ($c < strlen($sql)){
104
+ if ($sql[$c] == '\\'){
105
+ $c += 2;
106
+ continue;
107
+ }
108
+ if ($sql[$c] == $q){
109
+ $slen = $c + 1 - $pos;
110
+ $tokens[] = substr($sql, $pos, $slen);
111
+ $pos += $slen;
112
+ break;
113
114
+ $c++;
115
116
117
118
119
# <date string>
120
# <time string>
121
# <timestamp string>
0 commit comments