Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- My model:
- function wait_count()
- {
- $query_str = "select * from wait";
- $q = $this->db->query($query_str);
- if($q->num_rows() > 0)
- {
- foreach($q->result() as $wait)
- {
- $data[] = $wait;
- }
- return $data;
- }
- }
- My controller:
- $data['wait_count'] = $this->home_model->wait_count();
- My view:
- <? foreach($wait_count as $count): ?>
- *** None of these work.
- <? echo $count->num_rows(); ?>
- <? echo $wait_count->num_rows(); ?>
- <? endforeach; ?>
Add Comment
Please, Sign In to add comment