codeigniter query result

72

    $sql="Select * from my_table where 1";    
    $query = $this->db->query($SQL);
    return $query->result_array();
$query = $this->db->query("SELECT * FROM users;");

foreach ($query->result('User') as $user)
{
        echo $user->name; // access attributes
        echo $user->reverse_name(); // or methods defined on the 'User' class
}

Comments

Submit
0 Comments