/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$query = $this->db->query("SELECT * FROM (user_fav_doc) JOIN ica_user_master ON ica_user_master.user_id =user_fav_doc.owner_id JOIN ica_document ON ica_document.document_id =user_fav_doc.document_id JOIN ica_transaction_group ON ica_transaction_group.transaction_id =ica_document.transaction_group_id JOIN ica_transaction_type ON ica_transaction_type.trans_type_id =ica_document.transaction_type_id WHERE user_fav_doc.user_id =$user_id ORDER BY owner_id desc LIMIT $offset, $limit"); //echo $arr[0]; foreach($query->result() as $row) { $data[]=$row; } $data[]=$count; { return $data; }else { return 0; }