Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    Quote Originally Posted by MYSQL
    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
    Code:
    INSERT INTO `[DB_NAME]`.`users` (`USER_ID`, `USER_FIRST`, `USER_LAST`, `USER_NAME`, `USER_PASS`, `USER_EMAIL`, `USER_BAN`, `USER_AVATAR`, `USER_ADDRESS1`, `USER_ADDRESS2`, `USER_CITY`, `USER_STATE`, `USER_COUNTRY`, `USER_ZIP`, `USER_BIRTHDAY`, `USER_GENDER`) VALUES (NULL, 'fd', 'fd', 'user', 'pass', 'fd@fd.com', '0', '[BLOB_DATA]' ,'sdf', 'asdf', 'asdf', 'sadf', 'Country', 'A1A 1A1', '00-00-0000', 'MALE');
    I am having a tough time trying to decipher this error, If any help coud be provided it would be much appreciated.
    Thee Pyro Wolf

  2.  

  3. #2
    Senior Member
    Join Date
    Dec 2008
    Posts
    483
    Member #
    17875
    Liked
    1 times
    Quote Originally Posted by pyrodragon
    Code:
    INSERT INTO `[DB_NAME]`.`users` (`USER_ID`, `USER_FIRST`, `USER_LAST`, `USER_NAME`, `USER_PASS`, `USER_EMAIL`, `USER_BAN`, `USER_AVATAR`, `USER_ADDRESS1`, `USER_ADDRESS2`, `USER_CITY`, `USER_STATE`, `USER_COUNTRY`, `USER_ZIP`, `USER_BIRTHDAY`, `USER_GENDER`) VALUES (NULL, 'fd', 'fd', 'user', 'pass', 'fd@fd.com', '0', '[BLOB_DATA]' ,'sdf', 'asdf', 'asdf', 'sadf', 'Country', 'A1A 1A1', '00-00-0000', 'MALE');
    I am having a tough time trying to decipher this error, If any help coud be provided it would be much appreciated.

    You may be missing the word "VALUES"

    INSERT INTO [TABLENAME] VALUES ( //all values)
    INSERT INTO [TABLENAME] (column list) VALUES (//column values)

  4. #3
    Senior Member Danny[MLWA]'s Avatar
    Join Date
    Jun 2009
    Location
    Goldsboro, North Carolina, USA
    Posts
    109
    Member #
    19147
    Liked
    5 times
    Problem is:

    Code:
    `[DB_NAME]`.`users`
    Try
    Code:
    `[DB_NAME].users`
    or
    Code:
    `users`
    When you're selecting the table like that, MySQL sees database.table as one segment, you're breaking it into 2 segments with the `database`.`table` with the . being left out.
    Lead Web Designer
    MLW & Associates, LLP.
    W3C Standards Complaint and SEO Friendly
    Admin of Vraul
    WordPress.org Developer


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

for the right syntax to use near
,
for the right syntax to use near inert into
,

right syntax to use near at line 2

Click on a term to search for related topics.
All times are GMT -6. The time now is 02:14 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com