When I try this
$this->db->query('SELECT * FROM WMY_VIEW WHERE id_bla = ?
ORDER BY bla, blabla', array($bla))->result_array();
I'm getting this error
Query error: ERROR: relation "WMY_VIEW" does not exist.
WMY_VIEW is a sql-view, not a table. BUT in regular php, it works
$sql = "SELECT * FROM WMY_VIEW WHERE id_bla=".$bla." ORDER BY bla, blabla";
$results = pg_query(CONEXION, $sql);
What's the problem with CI? What I'm missing?
PS: Database (PostgreSQL
) it's not mine.