Ok, this isn’t the full code obviously but this is the code up to where the error is.
$this->db->select('post_likes');
$this->db->from('user_dash_posts');
$this->db->where('post_idn', $idn);
$this->db->where('isactive', '0');
if($this->db->count_all_results() > 0)
{
$dataDB = $this->db->get();
I am getting “No table used” in regards to the get() statement of the final line I show here. I am still kind of new to the whole CI database class/helper, as I used to be more about handwriting full queriers. But I am trying to school myself on ORM layers and get better familiar with them. That being a mute point to my question however. Im trying to figure out what I did wrong with this statement, what is the fix, and if at all possible an explanation of how I did it wrong so I can understand and not to it again.
According to the documentation:
If you want to reuse the query, use the caching methods which can be found at the bottom of the same page. Don’t forget to flush the cache when done:
EDIT:
Another option where you use a single query instead of two: