|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Data Structures | |
| class | ADORecordset_mssql_n |
Variables | |
| if(preg_match($regexp, $sql)) | $pairs = array() |
| Remove pairs of single-quotes. | |
| $regexp = '/(' . SINGLEQUOTE . SINGLEQUOTE . ')/' | |
| if($list_of_pairs) | $literals = array() |
| Remove the rest of literals present in the query. | |
| if($list_of_literals) if(!empty($literals)) if(!empty($literals)) | $result = preg_replace("/((<@#@#@PAIR-(\d+)@#@#@>)+)N'/", "N'$1", $result) |
| Analyse literals to prepend the N char to them if their contents aren't numeric. | |
Remove the rest of literals present in the query.
Definition at line 118 of file adodb-mssql_n.inc.php.
Remove pairs of single-quotes.
Definition at line 105 of file adodb-mssql_n.inc.php.
| $regexp = '/(' . SINGLEQUOTE . SINGLEQUOTE . ')/' |
Definition at line 106 of file adodb-mssql_n.inc.php.
| if (!empty($pairs)) if ($result!=$sql &&$this->debug) return $result = preg_replace("/((<@#@#@PAIR-(\d+)@#@#@>)+)N'/", "N'$1", $result) |
Analyse literals to prepend the N char to them if their contents aren't numeric.
Re-apply pairs of single-quotes to the text.
Re-apply literals to the text Any pairs followed by N' must be switched to N' followed by those pairs (or strings beginning with single quotes will fail)
Print transformation if debug = on
Non numeric string, prepend our dear N
Definition at line 148 of file adodb-mssql_n.inc.php.