[eluser]@HR13[/eluser]
Yes, I see something wrong with my query. That mean like this :
select tblog.id, (select count(id) from tb_post as tbpos where tblog.id = tbpos.id) as name from tb_login as tblog where tblog.login_as = “admin” and tblog.status = 2
The problem is I want to put in the model:
Some think in my mind:
Function flex_ajax(){
$query['main_query'] = 'select tblog.id, (select count(id) from tb_post as tbpos where tblog.id = tbpos.id) as name from tb_login as tblog where tblog.login_as = “admin” and tblog.status = 2
{SEARCH_STR}';
$query['count_query'] = 'select count(id) as record_count from tb_login as tblog where tblog.login_as = “admin” and tblog.status = 2
{SEARCH_STR}';
$build_query = $this->CI->flexigrid->build_query($query,false);
$return['result'] = $this->db->query($build_query['main_query']);
$rec_count = $this->db->query($build_query['count_query']);
$return['count'] = $rec_count->row()->record_count;
Return $return;
}
But the result its not comming, lazy loading unstopable.
The first I check option coloum and controler result it's not wrong, I test model with active record and a simple query.
It's show a result.
Thanks before ^^