Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (! defined('BASEPATH')) exit('No direct script access');
- class class_name extends Model {
- //model file to the sidebar on include/header / the sidebar_helper file
- function getSidebarReviews() {
- $this->db->select('id, imgPath, description, date, approved');
- $sidebarReviews = $this->db->get('reviews', 7);
- //Check if the sidebarReviews get something, if yes: return it
- if($sidebarReviews->num_rows() > 0)
- {
- return $sidebarReviews->result()
- }
- }
- }
Add Comment
Please, Sign In to add comment