Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8643245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:59:05+00:00 2026-06-12T11:59:05+00:00

Ok, this isn’t the full code obviously but this is the code up to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:59:06+00:00Added an answer on June 12, 2026 at 11:59 am

    According to the documentation:

    Normally, when an Active Record call is completed, all stored information is reset for the next call.

    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:

    $this->db->start_cache();
    $this->db->select('post_likes');
    $this->db->from('user_dash_posts');
    $this->db->where('post_idn', $idn);
    $this->db->where('isactive', '0');
    $this->db->stop_cache();
    
    if($this->db->count_all_results() > 0) {
         $dataDB = $this->db->get();
    }
    $this->db->flush_cache();
    

    EDIT:

    Another option where you use a single query instead of two:

    $this->db->select('post_likes');
    $this->db->from('user_dash_posts');
    $this->db->where('post_idn', $idn);
    $this->db->where('isactive', '0');
    $query = $this->db->get();
    
    if($query->num_rows() > 0) {
         $dataDB = $query->result();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This isn't a code question for once, but it definitely has me confused. Basically,
This isn't really related to a specific error; my code is not doing what
This isn't the complete code, but it's the parts that are causing problems. I've
This isn't the best question ever, but since search engines feel the need to
This isn't working in visual studio 2010 , it gives me the following error
This isn't strictly a programming question, but I'm asking it here because it's certainly
This isn't cross-platform code... everything is being performed on the same platform (i.e. endianess
This isn't that big of a deal but I was wondering if it can
This isn't valid code: public class MyClass { private static boolean yesNo = false;
This isn't the best programming question but lets face it, the server fault guys

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.