Welcome Guest, Not a member yet? Register   Sign In
Passing JSON data to the server (?)
#5

[eluser]rvent[/eluser]
Code:
$dbQuery = $this->db->query("SELECT PartNumber, PartNumberID FROM PartNumber
                                    $where LIMIT $limit");
        
        $total =  $dbQuery->num_rows();
        $data = json_encode($dbQuery->result_array());
        $data = '{"total":"'. $total. '","results":' .$data. '}';
        $this->output->set_output($data);

It woks fine for all my CI and JavaScript stuff...


Messages In This Thread
Passing JSON data to the server (?) - by El Forum - 04-30-2008, 04:16 PM
Passing JSON data to the server (?) - by El Forum - 04-30-2008, 04:58 PM
Passing JSON data to the server (?) - by El Forum - 04-30-2008, 05:19 PM
Passing JSON data to the server (?) - by El Forum - 05-01-2008, 04:57 AM
Passing JSON data to the server (?) - by El Forum - 05-01-2008, 08:03 AM
Passing JSON data to the server (?) - by El Forum - 05-01-2008, 08:32 AM
Passing JSON data to the server (?) - by El Forum - 05-01-2008, 08:56 AM
Passing JSON data to the server (?) - by El Forum - 05-01-2008, 09:14 AM
Passing JSON data to the server (?) - by El Forum - 05-01-2008, 09:44 AM
Passing JSON data to the server (?) - by El Forum - 05-01-2008, 11:35 AM
Passing JSON data to the server (?) - by El Forum - 05-02-2008, 01:58 AM
Passing JSON data to the server (?) - by El Forum - 05-02-2008, 09:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB