[eluser]WanWizard[/eluser]
All fine, but your query has 'user_id' in the WHERE clause. And your query refers to a user_id field in the users table, and an id field in the example_tbl table. So what is it?
It's very difficult answering questions if the question isn't correct, don't you think?
In the assumption that there are no more suprises, and the field is called user_id, the query should be
Code:
$this->db->query('SELECT a.slogan, a.brief, u.user_id, u.name FROM example_tbl AS a JOIN users AS u USING (user_id) WHERE u.user_id = "' . USER_ID . '"');
or
Code:
$this->db->select('a.slogan, a.brief, u.user_id, u.name');
$this->db->from('example_tbl a');
$this->db->join('users u', 'a.user_id = u.user_id'); // standard AR doesn't support USING
$this->db->where('u.user_id="'.USER_ID.'"');
$query = $this->db->get();