Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manipulate query result #57

Open
blagi opened this issue Jun 26, 2014 · 0 comments
Open

Manipulate query result #57

blagi opened this issue Jun 26, 2014 · 0 comments

Comments

@blagi
Copy link

blagi commented Jun 26, 2014

I have an addition to the Ignited Datatables. It's on my fork:
https://github.com/blagi/Ignited-Datatables/
I don't know how to post it here. Please help. Also some testing, style modification and integration to this original are welcomed.

Added public var $queryResult. Added two public methods:
generateResult() and produceOutputFromResult().
Now Datatables can be
called in another way:

$this->load->library("Datatables");

$this->datatables
->select("id as DT_RowId, email, last_login")

->from('user');
// echo $this->datatables->generate();
$raw_data = $this->datatables->generateResult();
foreach ($raw_data->result() as $row) {
$row->last_login_display = date('d.m.Y H:i', strtotime($row->last_login));
}
$res = $this->datatablesb->produceOutputFromResult();
echo $res;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant