CodeIgniter Forums
Error Number 1146 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Error Number 1146 (/showthread.php?tid=57675)



Error Number 1146 - El Forum - 04-02-2013

[eluser]ede196620[/eluser]
Recently i reinstalled my computer OS from windows to Ubuntu. Before the installation of Ubuntu i was working on a project for me to learn Codeigniter but when i tried to run one of the pages on my project i am getting this error :

Code:
Error Number: 1146

Table 'user_test.tblQuestions' doesn't exist

SELECT * FROM (`tblQuestions`)

Filename: /var/www/Surva/models/create_model.php

Line Number: 14

i cant figure out why it was working fine when i was using windows
can anyone help me here ?
her is my model :


Code:
public function __construct()
{
  $this->load->database();
}

        public function get_question($slug = FALSE)
{
if ($slug === FALSE)
{
  $query = $this->db->get('tblQuestions');
  return $query->result_array();
}

$query = $this->db->get_where('tblquestions', array('Question' => $slug));
return $query->row_array();
}

the error message is on this line
Code:
$query = $this->db->get('tblQuestions');
Is the error sayng user_test.tblQuestions dose not exist
or is it saying tblQuestions from user_test database dose not exist because user_test is my database name ?




Error Number 1146 - El Forum - 04-02-2013

[eluser]TheFuzzy0ne[/eluser]
It's saying that the database 'user_test' exists, but there's no table within it called 'tblQuestions'.