I'm having a strange issue with codeigniter + postgresql. This is my table:
sLearning=> select * from lezione;
id | titolo | descrizione | data | corsoid
----+------------------+-------------+------------+---------
1 | prova | | 2014-10-09 | 1234
2 | Lezione di oggi! | | 2014-10-09 | 1234
(2 rows)
I' have manually inserted these two records to test my queries. Btw, this is inside my model Lezione_m:(I removed some checks and other controls but anyway, even this version is not working:)
public function get_lezione()
{
echo $this->db->_error_message();
$query = $this->db->get('lezione');
return $query->result();
}
This is my controller:
class Test_c extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->model('Lezione_m');
}
public function index()
{
$this->load->view('test', $data);
$this->output->enable_profiler(TRUE);
echo '<pre>';
print_r($this->Lezione_m->get_lezione(null, 1234));
echo '</pre>';
}
The print_r:
Array
(
)
What the profiler says about my query:
0.0001 SELECT *
FROM "lezione"
Not sure what is going on here. I'm pretty sure that codeigniter it's connected to the database ( i would get some kind of error in that case).