| @@ 516-522 (lines=7) @@ | ||
| 513 | private function _parseQueryParams($sql, array $params = array()) |
|
| 514 | { |
|
| 515 | // is there anything to parse? |
|
| 516 | if ( |
|
| 517 | strpos($sql, '?') === false |
|
| 518 | || |
|
| 519 | count($params) === 0 |
|
| 520 | ) { |
|
| 521 | return array('sql' => $sql, 'params' => $params); |
|
| 522 | } |
|
| 523 | ||
| 524 | $parseKey = md5(uniqid((string)mt_rand(), true)); |
|
| 525 | $sql = str_replace('?', $parseKey, $sql); |
|
| @@ 791-797 (lines=7) @@ | ||
| 788 | public function _parseQueryParamsByName($sql, array $params = array()) |
|
| 789 | { |
|
| 790 | // is there anything to parse? |
|
| 791 | if ( |
|
| 792 | strpos($sql, ':') === false |
|
| 793 | || |
|
| 794 | count($params) === 0 |
|
| 795 | ) { |
|
| 796 | return array('sql' => $sql, 'params' => $params); |
|
| 797 | } |
|
| 798 | ||
| 799 | $parseKey = md5(uniqid((string)mt_rand(), true)); |
|
| 800 | ||