10-30-2017, 11:48 PM
Hi,
$this->db->select('*');
$this->db->from('payment_transaction');
if ($searchFilter<>"") {
$this->db->where("paymentMethod",$searchFilter);
$this->db->or_where("paymentId",$searchFilter);
$this->db->or_where("paymentState",$searchFilter);
}
////////////////////////////////// HERE I NEED, THE COUNT RECRODS IN THAT TABLE, WITHOUT LIMITATION.....
if ($startRec==0) {
$this->db->limit($limit);
} else {
$this->db->limit($limit,$startRec);
}
$transcationQuery=$this->db->get();
////////////////////////////////// HERE I NEED, FETCH RECORDS WITH LIMITATION.....
Note: Please don't repeate the code....
But this case, not working, Please solve this problem as soon as possible...
$this->db->select('*');
$this->db->from('payment_transaction');
if ($searchFilter<>"") {
$this->db->where("paymentMethod",$searchFilter);
$this->db->or_where("paymentId",$searchFilter);
$this->db->or_where("paymentState",$searchFilter);
}
////////////////////////////////// HERE I NEED, THE COUNT RECRODS IN THAT TABLE, WITHOUT LIMITATION.....
if ($startRec==0) {
$this->db->limit($limit);
} else {
$this->db->limit($limit,$startRec);
}
$transcationQuery=$this->db->get();
////////////////////////////////// HERE I NEED, FETCH RECORDS WITH LIMITATION.....
Note: Please don't repeate the code....
But this case, not working, Please solve this problem as soon as possible...