/** * Where语句转 * @param null $where in type string or array * @return string */ private function lodeWhere($where = null) { $_inWhere = ''; // 拼接WHERE $where != null ? $_inWhere = ' WHERE ' : null; // 数组的方式 if (Verify::isArr($where)) { foreach ($where as $k => $v) { $_inWhere .= $k . "='{$v}'" . ' AND '; } $_inWhere = substr($_inWhere, 0, -4); } // 字符串方式 if (is_string($where)) { $_inWhere .= $where; } return $_inWhere; }