Error Number 1146 Codeigniter
Contents |
here for a quick overview of the site Help Center Detailed answers to any table doesn t exist error in codeigniter questions you might have Meta Discuss the workings and policies of
Db Function Failed With Error Number 1146
this site About Us Learn more about Stack Overflow the company Business Learn more about hiring error number 1146 dle developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is error number 1146 table doesn't exist a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up CodeIgniter - Error Number: 1146 (Table doesn't exist after execute a “CREATE TABLE” command) up vote 1 down vote favorite I've posted yesterday an issue with an mySQL update syntax on CodeIgniter in here: CodeIgniter - MySQL Error 1064 (Update table1 inner join table2(...)) But now after I solved that problem, another one come up. Now the update query doesn't know the new created table. But if I change to a select statement, it works smoothly. For that reason I've decided to post the full script. Code: load->database(); $query_tbaux='CREATE TABLE IF NOT EXISTS STUDY_LIST_AUX AS ( SELECT DISTINCT p.pat_id, p.pat_custom1 age, p.pat_name, p.pat_sex, s.study_iuid, p.pat_birthdate, s.accession_no, s.study_datetime date_s, s.study_desc, s.mods_in_study, s.pk, c.institution, s.study_block, s.study_urgent, \'0000-00-00 00:00:00\' AS \'report_date\', \'{null}\' AS \'report_status\', s.study_tipo, s.study_src, s.study_consulta FROM study s INNER JOIN patient p ON s.patient_fk = p.pk INNER JOIN series c ON c.study_fk = s.pk INNER JOIN rel_users_hosp u ON u.hosp_id = c.institution WHERE s.study_datetime >= \'2015-04-26 00:00:00\' AND s.study_datetime <= \'2015-04-30 23:59:59\' AND s.study_iuid IS NOT NULL AND u.user_id = \'admin\' )'; if ($this->db->query($query_tbaux)) { echo "Q True!
"; $data = array( 'STUDY_LIST_AUX.report_date' => "DATE_FORMAT(study_report.report_date,'%Y-%m-%d %h:%i:%s')", 'STUDY_LIST_AUX.report_status' =>
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow http://stackoverflow.com/questions/29997668/codeigniter-error-number-1146-table-doesnt-exist-after-execute-a-create-ta Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error 1146 in codeigniter up http://stackoverflow.com/questions/21671473/error-1146-in-codeigniter vote 0 down vote favorite I am trying to insert data into my table called 'user' but I'm getting this error. I've set the database properly. A Database Error Occurred Error Number: 1146 Table 'folwd.users' doesn't exist SELECT * FROM (`users`) WHERE `username` = 'Pallavi123' LIMIT 1 Filename: C:\wamp\www\PhpProject1\system\database\DB_driver.php Line Number: 330 The table named users doesn't exist at all. user_manager_controller: public function register(){ if($this->session->userdata('logged_in')){ //user is already logged in redirect('profile'); }else{ //init //$data['country_list']=$this->config->item('um_country_list'); $data['username']=''; $data['firstname']=''; //$data['secondname']=''; $data['lastname']=''; $data['email']=''; //$data['dateofbirth']=''; //$data['default_country']=$this->config->item('um_default_country'); //load rules $rules=$this->config->item('um_register_rules'); //default msg $data['msg']=$this->lang->line('um_form_msg'); if(isset($_POST['submit'])){ //the user has submitted the form //get the user input $data['username']=$this->input->post('username'); $data['firstname']=$this->input->post('firstname'); //$data['secondname']=$this->input->post('secondname'); $data['lastname']=$this->input->post('lastname'); $data['email']=$this->input->post('email'); //$data['dateofbirth']=$this->input->post('dateofbirth'); //$data['default_country']=$this->input->post('country'); $this->form_validation->set_rules($rules);//check with the rules if ($this->form_validation->run() === FALSE){ //validation failed $data['msg']=$this->lang->line('um_form_error'); $this->load->view('user_register_form',$data); }else{ //validation passed $dbdata=array( 'username'=>$this->input->post('username'), 'firstname'=>$this->input->post('firstname'), //'secondname'=>$this->input->post('secondname'), 'lastname'=>$this->input->post('lastname'), 'email'=>$this->input->post('email'), 'password'=>$this->input->post('password'), //'dateofbirth'=>$this->input->post('dateofbith'), //'country'=>$this->i
Number 1146 Thread Closed 0 Vote(s) - 0 Average 1 2 3 4 5 Thread Modes Error Number 1146 El Forum Unregistered #1 04-02-2013, 03:08 AM [eluser]ede196620[/eluser] Recently i http://forum.codeigniter.com/thread-57675.html 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 error number 1146 = $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 ? El Forum Unregistered #2 04-02-2013, 03:39 AM [eluser]TheFuzzy0ne[/eluser] It's saying that the database 'user_test' exists, but there's no table within it called 'tblQuestions'. Thread Closed -------------------- Private Messages User Control Panel Who's Online Search Forum Home General -- News & Discussion -- Lounge -- Events -- Regional User Groups Using CodeIgniter -- Choosing CodeIgniter -- Installation & Setup -- Model-View-Controller -- Libraries & Helpers -- Best Practices -- General Help CodeIgniter 4 -- CodeIgniter 4 Development -- CodeIgniter 4 Feature Requests -- CodeIgniter 4 Support -- CodeIgniter 4 Discussion Development -- CodeIgniter 3.x -- CodeIgniter 2.x -- Issues -- NetBeans Plugin External Resources -- Addins -- Jobs -- Learn More -- Spotlight CodeIgniter Archived (from EllisLab) -- Archived General Discussion -- Archived Lib