I have a record being inserted and I don't see what the problem is. This is the insert 
statement:

insert into auth_users (username, password, firstname, lastname, address1, address2, 
city, state, zip, phone, fax, email, hint) values ("username", "password", 
"firstname", "lastname", "Address1", "", "City", "ST", "12345", "444-555-6666", "", 
"[EMAIL PROTECTED]", "password hint") where username = "username" and password = 
"cd6c8f619fe02d9ea5d283cea1dfdefc"

Here is the error that I am getting:

You have an error in your SQL syntax near 'where username = "tobymiller" and password 
= "cd6c8f619fe02d9ea5d283cea1dfdefc"' at line 1

I am using a MD5 encrypted string for the password, that's what that is.

Here is the table that this record is being inserted into:

CREATE TABLE auth_users (
   username varchar(20) NOT NULL,
   password varchar(120) NOT NULL,
   firstname varchar(36) NOT NULL,
   lastname varchar(36) NOT NULL,
   address1 varchar(60),
   address2 varchar(60),
   city varchar(60),
   state char(2),
   zip varchar(10),
   phone varchar(12),
   fax varchar(12),
   email varchar(120) NOT NULL,
   hint varchar(120),
   ipaddress varchar(15),
   hash varchar(120),
   created timestamp(14),
   createdby varchar(20) DEFAULT 'byhand' NOT NULL,
   loggedin timestamp(14),
   UNIQUE username (username)
);


Any ideas?

Thanks,
Toby

Reply via email to