I have a table like this:
id | username | email
---+----------+----------------
1 | John | john@example.com
17 | Mary | mary@example.com
And I want to get a result like this:
array(
1 => array(
username => 'John',
email => 'john@example.com'
),
17 => array(
username => 'Mary',
email => 'mary@example.com'
)
);
Is it possible to do with built-in functions in CodeIgniter?
to the best of my knowledge there no built in functions for the same, though you can create a base model, extend it and create a function for the same,