Этот расширенный файл находится в ядре/ и называется MY_Input.php
Код: Выделить всё
class MY_Input extends CI_Input {
function save_query($query_array) {
$CI =& get_instance();
$CI->db->insert('ci_query', array('query_string' => http_build_query($query_array)));
return $CI->db->insert_id();
}
function load_query($query_id) {
$CI =& get_instance();
$rows = $CI->db->get_where('ci_query', array('id' => $query_id))->result();
if (isset($rows[0])) {
parse_str($rows[0]->query_string, $_GET);
}
}
}
Код: Выделить всё
this->input->load_query($query_id);
$query_array = array(
'fan_type_options'=>$this->input->get('fan_type_options'),
'fan_motor_type' => $this->input->get('fan_motor_type'),
'fan_ac_voltage' => $this->input->get('fan_ac_voltage'),
'fan_cfm' => $this->input->get('fan_cfm'),
'part-no' => $this->input->get('part-no'),
);
Код: Выделить всё
fan_type_options=Blower&fan_motor_type=EC&fan_ac_voltage=&fan_cfm=&part-no=
Подробнее здесь: https://stackoverflow.com/questions/142 ... o-an-array
Мобильная версия