| @@ 512-518 (lines=7) @@ | ||
| 509 | private function _parseQueryParams($sql, array $params = array()) |
|
| 510 | { |
|
| 511 | // is there anything to parse? |
|
| 512 | if ( |
|
| 513 | strpos($sql, '?') === false |
|
| 514 | || |
|
| 515 | count($params) === 0 |
|
| 516 | ) { |
|
| 517 | return array('sql' => $sql, 'params' => $params); |
|
| 518 | } |
|
| 519 | ||
| 520 | $parseKey = md5(uniqid((string)mt_rand(), true)); |
|
| 521 | $sql = str_replace('?', $parseKey, $sql); |
|
| @@ 787-793 (lines=7) @@ | ||
| 784 | public function _parseQueryParamsByName($sql, array $params = array()) |
|
| 785 | { |
|
| 786 | // is there anything to parse? |
|
| 787 | if ( |
|
| 788 | strpos($sql, ':') === false |
|
| 789 | || |
|
| 790 | count($params) === 0 |
|
| 791 | ) { |
|
| 792 | return array('sql' => $sql, 'params' => $params); |
|
| 793 | } |
|
| 794 | ||
| 795 | $parseKey = md5(uniqid((string)mt_rand(), true)); |
|
| 796 | ||