[eluser]CroNiX[/eluser]
Why aren't you just using the built in database class instead of hand rolling it?
As far as your last question:
Code:
$this->load->view('myview', $data, true);
would return the RENDERED view as a variable, so you would need to assign it to a variable
Code:
$myview = $this->load->view('myview', $data, true);
Then
or (pass it to another view, where you would echo the 'myview' variable (containing the other view) where it needs to go...
Code:
$data['myview'] = $this->load->view('myview', $data, true);
$this->load->view('master_template', $data);
And in your master_template.php, just
Code:
<div id="menu"><?php echo $myview; ?></div>
or whatever...