Having a problem with returning results from one particular table in a database.
I have two tables:
a) repository_notes
b) repository_noteupdates (this one is giving the problem)
Here is an image showing there are some data in both tables using a simple select * query using Navicat.
However When I query repository_notes below:
print_r($this->db->get('repository_notes')->result_array());
It gives me the following result set:
Array
(
[0] => Array
(
[note_id] => 1
[note_title] => This is my note
[note_content] => Lorem ipsum dolor sit amet, consectetur adipiscing elit. In laoreet lobortis lacus, ac iaculis risus tristique nec. Curabitur porta gravida est, non tincidunt nunc porta nec. Nunc diam metus, feugiat non lobortis
[note_userId] => 2302
[note_pageno] => 12
[note_deleted] => 0
[note_bookid] => 12
)
[1] => Array
(
[note_id] => 2
[note_title] => This is my note
[note_content] => Lorem ipsum dolor sit amet, consectetur adipiscing elit. In laoreet lobortis lacus, ac iaculis risus tristique nec. Curabitur porta gravida est, non tincidunt nunc porta nec. Nunc diam metus, feugiat non lobortis
[note_userId] => 2302
[note_pageno] => 12
[note_deleted] => 0
[note_bookid] => 12
)
However when I run the query below:
print_r($this->db->get(‘repository_noteupdates’)->result_array());
I get no results:
Array
(
)
Have any of you seen anything like this before and have a solution it would be appreciated.

So I found the solution for this.
It seems that if i remove the name update from the table name, it seems to work. So i have called the table
repository_noteupdatainstead ofrepository_noteupdatesand it is now working.
Thanks guys for helping out. It is strange because I cannot find any documentation in codeigniter saying update is a reserved word for a table name.