Error Number 1064 Codeigniter
Contents |
here for a quick overview error number 1054 in codeigniter of the site Help Center Detailed answers to error number 1146 in codeigniter any questions you might have Meta Discuss the workings and policies of this
Error Number 1048 Codeigniter
site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us
Error Number 1062 Codeigniter
Stack Overflow 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 Number: jinstaller install sql error db function failed with error number 1064 1064 in codeigniter up vote 0 down vote favorite 1 I am getting this error when ever i am uploading a file and storing details in the database using codeigniter here is my controller public function sugsn_up() { if ( $this->session->userdata('login_state') == FALSE ) $this->load->view('faculty/facultylog1_view'); else { $config['upload_path'] = './suggestion/'; $config['allowed_types'] = 'pdf|doc|docx|txt'; $config['max_size'] = '10000000'; $emp_id=$this->session->userdata('emp_id'); $this->load->library('upload', $config); $tname='subject_master'; $res['sub']=$this->faculty_model->return_rec($tname); $tname='course_master'; $res['crse']=$this->faculty_model->return_rec($tname); if ( ! $this->upload->do_upload()) { $error = array('error' => $this->upload->display_errors()); $this->load->view('faculty/up_sugsn', $error,$res); } else { $data = array('upload_data' => $this->upload->data()); $path=base_url().'attendence/'.$data['upload_data']['file_name']; $sdata=array('sug_id'=>NULL, 'emp_id'=>$emp_id, 'sug_name'=>$_POST['sugsn_name'], 'course_id'=> $_POST['cid'], 'sub_id'=> $_POST['sid'], 'link'=>$path ); $this->faculty_model->sugsn_up($sdata); $this->load->view('faculty/upload_success', $data); } } } and this is my model public function sugsn_up($sdata) { $this->db->insert('suggestion _master',$sdata); } My suggestion _master table has 6 filds Field Type Collation sug_id bigint(20) emp_id bigint(20) sug_name te
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
Mysql Error Number 1064
site About Us Learn more about Stack Overflow the company Business Learn more update set `last_activity` about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x select data where id codeigniter 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 mySQL CodeIgniter http://stackoverflow.com/questions/18706479/error-number-1064-in-codeigniter - Syntax Error Number: 1064 [closed] up vote 0 down vote favorite I'm trying to wrap my head around this and I can't seem to figure out how this query returns a syntax error. My knowlegde of mySQL is small as I'm just getting to grips with it. This is the query I'm trying to execute: function _delete_leaf_node($id){ $query =""; $query .=" SELECT @myLeft http://stackoverflow.com/questions/16396272/mysql-codeigniter-syntax-error-number-1064 := lft, @myRight := rgt, @myWidth := rgt - lft + 1"; $query .=" FROM pages"; $query .=" WHERE id =".$id.";"; $query .=" DELETE FROM pages WHERE lft BETWEEN @myLeft AND @myRight;"; $query .=" UPDATE pages SET rgt = rgt - @myWidth WHERE rgt > @myRight;"; $query .=" UPDATE pages SET lft = lft - @myWidth WHERE lft > @myRight;"; $this->_custom_query($query); } This is the error I get returned: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELETE FROM pages WHERE lft = @myLeft UPDATE pages SET rgt = rgt + 1, lft = lft ' at line 1 I have checked if the right id is passed. Perhaps the variables are not set in the proper manner? I just don't know how one would check for that. Any help would be greatly appreciated. php mysql codeigniter share|improve this question asked May 6 '13 at 10:00 Quantize 50115 closed as too localized by Jocelyn, Ocramius, cryptic ツ, DaveRandom, hakre May 8 '13 at 11:25 This question is unlikely to help any future vi
codeigniter for now.and i got some problem with the user login system. basically user can login using his/her email address, and then the login system will retrieve the user corresponding "username" base https://www.daniweb.com/programming/web-development/threads/354580/whats-wrong-with-my-codeigniter-user-query on the email address entered.This username will then be stored as session and will going to be used for all of the user's activities on the site. So, for login system, after the user has entered the details of his own, the validate_credentials() function will be called : function validate_credentials() { $this->load->model('membership_model'); $query = $this->membership_model->validate(); if($query) // if the user's credentials validated... { $sql = $this->db->query("SELECT * FROM error number membership WHERE email_address=".$this->input->post('email')); if ($sql->num_rows() > 0) { $row = $query->row_array(); $username = $row['username']; } $data = array( 'username' => $username, 'is_logged_in' => true ); $this->session->set_userdata($data); redirect('site/home/'.$username); } else // incorrect username or password { $this->index(); } } and this function will interact with the validate() method in the membership_model to check weather or not the details entered is correct.this is the validate() method : function validate() { error number 1064 $this->db->where('email_address', $this->input->post('email')); $this->db->where('password', md5($this->input->post('password'))); $query = $this->db->get('membership'); if($query->num_rows == 1) { return true; } } i get this error when try to login : A Database Error Occurred Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@yahoo.com' at line 1 SELECT * FROM membership WHERE email_address=test_email@yahoo.com Filename: C:\xampp\htdocs\project\system\database\DB_driver.php Line Number: 330 So whats the mistake that i have done?any helps guys? thanks :) codeigniter php samsons17 -4 247 posts since Oct 2009 Community Member 3Contributors 7Replies 14Views 5 YearsDiscussion Span 5 Years Ago Last Post by kurtopia 0 R0bb0b 344 5 Years Ago try putting single quotes around the email address. Also, make sure that you are at least using mysql_real_escape_string for all human interaction into the database. 0 kurtopia 5 Years Ago yeah try putting quotes in the value of email address so that the query will treat it as the value of the field email_address.. 0 Discussion Starter samsons17 -4 5 Years Ago it didnt work..plus i believe this is not the problem for this.. 0 R0bb0b 344 5 Years Ago Error number 1064 is a syntax error. The only synt