• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
just a quickie

#1
[eluser]sore eyes[/eluser]
hi, the controller function is:

Code:
function enterNextShop()
    {
        $old_shop_id = $this->uri->segment(3);
        $data = $this->MShops->getNextShop($old_shop_id);
        $shop_id = $this->data->shop_id;
        redirect('welcome/enterShop/'.$shop_id);
        
    }

The model is this:

Code:
function getNextShop($old_shop_id)
    {
        $this->db->order_by('shop_id','ASC');
        $this->db->limit(1);
        $this->db->where('shop_id >',$old_shop_id);    
        $this->db->select('shop_id');
        $data = $this->db->get('shop');
        return $data;
    }

I wish to pull the shop_id and can't figure out what the code
$shop_id = $this->data->shop_id;
should be. I'd be grateful for a cure.


Messages In This Thread
just a quickie - by El Forum - 12-30-2008, 11:05 PM
just a quickie - by El Forum - 12-31-2008, 05:02 AM
just a quickie - by El Forum - 12-31-2008, 06:31 PM
just a quickie - by El Forum - 12-31-2008, 07:05 PM
just a quickie - by El Forum - 01-01-2009, 03:30 AM
just a quickie - by El Forum - 01-01-2009, 09:57 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.