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 5 of 5
  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 `PYROSITE_BUDDYCONNECT`.`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.

    The blob data fields actually contain a jpeg image and was removed solely because i didn't wish to waste space in this post with redundant hard to read data.
    Thee Pyro Wolf

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    What is [DB_NAME] supposed to be? Is that the way it executes in the database? If so, that's probably your problem.

  4. #3
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    No I actually have the database set to PYROSITE_BUDDYCONNECT this being the full name of the actual database.

    As a little background information if this helps:

    I had this exact query running quiet fine until I added the BLOB image into it. At that point the error started to come up. I is supposed to update add a record to the user database including an image.

    Thanks for all of your help.
    Thee Pyro Wolf

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    I seem to recall you need to do some careful stuff about inserting/updating BLOB columns. I don't remember what exactly though. But it might be worth it to try that without INSERTing into the BLOB column (i.e., omit it from the statement). If it goes well, then it might be worth it to try and update the BLOB separately.

  6. #5
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    I have finally managed to make the system work. As it turns out the error was not exactly in the SQL code however.

    I had forgotten to escape the image data when i was trying to insert it into the database. So by separating the insert command and the update for the image i was able to see a more clear error.

    Thanks for all of your help.
    Thee Pyro Wolf


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
  •  
All times are GMT -6. The time now is 05:07 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com