[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();