private function BuildQSFromArray($qs) { // check to see if we have values $qsVals = array_values($qs); if (_isArray($qsVals)) { $qs2 = array(); // check to see if we need to traverse the object if (strpos($qsVals[0], "=") === false) { // build query string foreach ($qs as $k => $v) { $qs2[] = "{$k}={$v}"; } } else { $qs2 = $qs; } unset($qs); } else { // we have an array/object with no values, so get the keys $qsKeys = array_keys($qs); $qs2 = array(); foreach ($qsKeys as $qsKey) { $qs2[] = "{$qsKey}="; } } return "/?" . implode("&", $qs2); }
private function _useMaster($sql) { $output = false; $words = explode(' ', $sql); if (_isArray($words)) { $output = in_array(strtoupper($words[0]), array('SELECT', 'CALL')); } return $output; }