[eluser]herrmoinsen[/eluser]
Hi MajiD,
sure I can, but it doesn't depend on the function the variable I passed to. The error occurs no matter which function is called.
But to give you an example, these two functions cause errors:
Code:
function show($id) {
$query = $this->db->get_where ('hmp_galleries', array('ID' => $id));
$result = $query->row_array ();
$data = array ('page_title' => $result["title"], 'page_cat' => 'albums', 'id' => $id);
$this->load->view('albums/show', $data);
}
Code:
function photo ($photo_id) {
if (!is_numeric ($photo_id)) {
redirect ('albums');
} else {
$res = mysql_query ("SELECT DISTINCT g.title AS `gTitle`, g.ID AS `gID` FROM `hmp_galleries` `g`
JOIN `hmp_img_images` `i` ON i.gallery = g.ID
WHERE i.ID = '$photo_id'");
$album = mysql_fetch_array ($res);
$data = array ('page_title' => $album["gTitle"], 'page_cat' => 'albums', 'photo_id' => $photo_id, 'album_id' => $album["gID"]);
$this->load->view ('albums/photo', $data);
}
}
Both in the controller Albums.
Cheers
herrmoinsen