Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Importing Data

  1. #1
    Join Date
    Apr 2006
    Posts
    447

    Default Importing Data

    I'm finding importing categories and links very hit and miss -- using IndexU there is no explanation of possible errors; categories just don't show up if there's something wrong. Today was a miss, so I tried to importing directly using phpmyadmin. The following error was received:

    #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 '6606 109526 Ashland ... (the first row)

    It's very strange. The structure and format is identical to successfully uploaded files.

    Any feedback is appreciated.

  2. #2
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    Howdy CEC

    Ive only ever used phpmyadmin to upload data of categories etc, and havent had any problems...

    What kinda of file are you uploading? I normally just used a text file (tab delimited)

    Cheers Ezy

  3. #3
    Join Date
    Apr 2006
    Posts
    447

    Default

    Howdy back at, ezykiwi!

    I always use a tab delimited .txt files. The structure of those not importing is identical with the majority that work.

    It's frustrating -- in part because '#1064 - You have an error in your SQL syntax ...' is an error that if you search in Google is all over the place. Yet there doesn't seem to be a clear-cut way of dealing with it.

  4. #4
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    an error in your sql syntax is just that... phpmyadmin doesnt know how to handle it. You probably have the ' character in your field data.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  5. #5
    Join Date
    Apr 2006
    Posts
    447

    Default

    Quote Originally Posted by inspireme
    an error in your sql syntax is just that... phpmyadmin doesnt know how to handle it. You probably have the ' character in your field data.
    No '

    The same structure and syntax for those that are working, and those that aren't -- each are the output of the same merge document, which forces conformity.

  6. #6
    Join Date
    May 2004
    Location
    New Zealand
    Posts
    600

    Default

    What i normally do when i get a error like that, is I do a test by trying to insert 1 field via the text file, that way you can find out if its the file structure or if like inspireme said its data in the fields....

    also how big is the text file?

    Cheers Ezy

  7. #7
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by CEC
    No '

    The same structure and syntax for those that are working, and those that aren't -- each are the output of the same merge document, which forces conformity.
    well, something is NOT conforming. if the data was correct, then it would be accepted. Since it is not accepting the data, then the data is not correct.

    You say the data is the same. But if it were the same, then it would be accepted. ERGO: the data is not the same.

    Computer software is nothing if not repetitious. It doesn't do one thing today and something different tomorrow. It doesn't work one way on one computer and another way on a different computer.

    I don't know why folks don't learn this . They want to challenge this and suspend the laws of how things work to explain the errors they see.

    Everything else being the same, if it says you have a syntax error, then trust me, you have a syntax error . Well, you may have been the one on one billion that finds a bug, but don't hold your breath.

    after all is said and done, you still have a syntax error. Find out what is causing the syntax error. You can tell us all day about how you do this or how you do that. but that is mostly irrelevant.

    when it says you have a "syntax [error] ... near '6606 109526 Ashland" then trust me, you have a syntax error with that part of the SQL code.

    Remember you are using PHP (which has its own syntax) to create a SQL statement (and SQL has its own syntax). Properly merging the two syntax's is where almost all of my problems occur.

    check to see if you have the right number of quote marks and that they are in the right place. Single and double. Check for commas.

    try posting the exact sql statement. or the line you are importing.




    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  8. #8
    Join Date
    Apr 2006
    Posts
    447

    Default

    Quote Originally Posted by esm
    Remember you are using PHP (which has its own syntax) to create a SQL statement (and SQL has its own syntax). Properly merging the two syntax's is where almost all of my problems occur.
    Thanks ESM.

    This is likely at the root. As noted, I have only been able to successfully import through IndexU -- which is fine -- I don't care how it gets in there. But, again, it's just not accepting about 1 in 4.

    The full error message in terms of my attempt at using phpmyadmin is in my first post.

    Thanks for bearing with me.
    Last edited by CEC; 06-23-2006 at 05:04 PM.

  9. #9
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    how many fields are do you have?



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  10. #10
    Join Date
    Apr 2006
    Posts
    447

    Default

    There are 20 fields.
    c

  11. #11
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    i can't check for tabs in what you posted, but that is another thing to look for: the correct number of fields/tabs in your imported lines.

    Yep, I know that you processed the data so that it would be the same but it isn't. you have a syntax error somewhere.



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  12. #12
    Join Date
    Apr 2006
    Posts
    447

    Default

    Here's the unsuccessful during IndexU import (delimiting shows). I do notice 'orderr_num' does not correspond to 'order_num' in SQL -- not sure how to account for this discrepancy or its affect on things?? -- especially considering many successful imports.
    Last edited by CEC; 06-23-2006 at 05:06 PM.

  13. #13
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by CEC
    Here's the unsuccessful during IndexU import (delimiting shows). I do notice 'orderr_num' does not correspond to 'order_num' in SQL -- not sure how to account for this discrepancy or its affect on things?? -- especially considering many successful imports.
    i don't know about your other imports but you will get a syntax error (sound familiar...?) if you have an incorrect column name (like 'orderr_num')



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  14. #14
    Join Date
    Apr 2006
    Posts
    447

    Default

    Do you happen to know where to find this field to correct it in IndexU? I have only used its default settings for these fields -- I don't even use this field.

    Still get the error when using phpmyadmin. Sorry, but the beginning of the error looks like this:

    ERROR: Unknown Punctuation String @ 48
    STR: </
    SQL: 6520109525 Andover

    The first line start with SQL: 6520109525 category and parent id have no space. All of the other records are spaced properly.
    Last edited by CEC; 06-23-2006 at 12:44 PM.

  15. #15
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    the actual field name is order_num

    the _511.sql file in the install folder shows the field names that were used during the creation process

    You would ALWAYS get a SQL error if you used the column name 'orderr_num' if the actual column name is 'order_num.'

    And how often is ALWAYS? ALWAYS. and that does not mean every fourth or fifth one, or 4 out of 5.


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

Similar Threads

  1. Importing Data
    By CEC in forum v5.x
    Replies: 2
    Last Post: 05-07-2006, 06:16 PM
  2. Where was the data inserted to?
    By mycolumbus in forum Extreme Dmoz Extractor - dmoz.org xml parser
    Replies: 2
    Last Post: 09-11-2005, 11:01 AM
  3. Added Data
    By ezykiwi in forum v3.2
    Replies: 1
    Last Post: 06-11-2004, 06:25 PM
  4. Import data,
    By aladdin in forum v5.x
    Replies: 9
    Last Post: 05-27-2003, 03:53 AM
  5. Can't import data
    By Phil Latio in forum v5.x
    Replies: 4
    Last Post: 10-15-2002, 12:40 PM

Posting Permissions

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