Welcome Guest, Not a member yet? Register   Sign In
Adding error!
#1

[eluser]miwrath[/eluser]
all my codes are correct except for the user_reg models:

here is the code:

Code:
<?php
class User_reg extends Model
{

function User_reg()
{
    parent::Model();
  
}

function register_user($username, $password, $password_conf, $f_name, $m_name, $l_name, $teach_id, $position)
{

    
    $query_str = "INSERT INTO accnt_info (username, password, f_name, m_name, l_name, teach_id, position)
        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
    
    $this->db->query($query_str, array($username, $password, $password_conf, $f_name, $m_name, $l_name, $teach_id, $position));
    
}




and this error comes out:



Code:
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 '' at line 2

INSERT INTO accnt_info (username, password, f_name, m_name, l_name, teach_id, position) VALUES ('mewmew', 'mcc', 'mcc', 'mew', 'mew', 'mew', '2011c000001', 'teacher',


Messages In This Thread
Adding error! - by El Forum - 09-26-2011, 04:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB