My bad, not enough sleep I guess.

Thanks,
Toby

----- Original Message -----
From: "Roger Ramirez" <[EMAIL PROTECTED]>
To: "Toby Miller" <[EMAIL PROTECTED]>
Cc: "MySQL List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 6:33 AM
Subject: Re: Insert Problem


> Hmmm.... I don't believe you can have a where in an insert statement.  You
> either do or you don't.  Perhaps you are thinking of update?
>
> ----- Original Message -----
> From: "Toby Miller" <[EMAIL PROTECTED]>
> To: "Liste mysql" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 30, 2001 6:28 AM
> Subject: Insert Problem
>
>
> 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
>
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to