Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 3rd, 2012  |  syntax: PHP  |  size: 0.32 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function get_shops($get_discount_type = false){
  2.                 $this->db->select('shops.*');
  3.                 $this->db->from('shops');
  4.                 if($get_discount_type)
  5.                 {
  6.                         $this->db->select('insertions.discount_type');
  7.                         $this->db->join('insertions', 'shops.id = insertions.shop_id');
  8.                 }
  9.                 $query = $this->db->get();
  10.                 return $query->result_array();