Welcome Guest, Not a member yet? Register   Sign In
Trying to pass variable from 1 Function to Another to Put in Array within same Model
#4

[eluser]jshultz[/eluser]
Ok, I tweaked it I think, I'm getting this error now:

A PHP Error was encountered

Severity: Notice

Message: Undefined index: id

Filename: models/gallery_model.php

Line Number: 48


Line 48 is
Code:
'busid'=> $bus_id['id'],

my get_bus_id function now looks like this:

Code:
function get_bus_id() {
        $userid = $this->tank_auth->get_user_id();
        $this->db->select('b.id');
        $this->db->from ('business AS b');
        $this->db->where ('b.userid', $userid);
        $query = $this->db->get();
            if ($query->num_rows() > 0) {
            return $query->result_array();
    }

and I changed the do_upload() function so that it says this:
Code:
$bus_id = $this->get_bus_id();


Messages In This Thread
Trying to pass variable from 1 Function to Another to Put in Array within same Model - by El Forum - 05-24-2010, 01:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB