• MySQL

    From Spectre@21:3/101 to Anybody on Thu Sep 24 14:17:00 2020

    Anyone any good at figuring out whats wrong with a .sql file? I'm trying to import one for this fangled trivia quiz. I've never had much to do with SQL in general. Mostly leave it to PHPmyAdmin if I can. So far the best result I've managed is importing some 26 lines before it stops and tells me there's an error on line 1..

    Having 26 intact lines in the table, if I then export those looking to emulate its syntax, I still get the same result, 26 lines in, and error...

    I'll leave a copy of the .sql file hiding on

    tlp.zapto.org/hidden_stuff/trivia.sql

    All input appreciate...

    Ta, Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: (21:3/101)
  • From alterego@21:2/116 to Spectre on Thu Sep 24 17:08:50 2020
    Re: MySQL
    By: Spectre to Anybody on Thu Sep 24 2020 02:17 pm

    I'll leave a copy of the .sql file hiding on tlp.zapto.org/hidden_stuff/trivia.sql

    I get a 404 for that file - did you work it out?

    ...δεσ∩

    ... Diplomacy is the art of saying Nice doggie! till you can find a rock.
    --- SBBSecho 3.11-Linux
    * Origin: I'm playing with ANSI+videotex - wanna play too? (21:2/116)
  • From Spectre@21:3/101 to alterego on Thu Sep 24 18:37:00 2020
    I'll leave a copy of the .sql file hiding on tlp.zapto.org/hidden_stuff/trivia.sql

    I get a 404 for that file - did you work it out?

    Ahhh no, but I did get interrupted before I put the file in place :/ Its in place now.

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: (21:3/101)
  • From Bugz@21:4/110 to Spectre on Thu Sep 24 06:48:42 2020
    Spectre wrote to Anybody <=-


    Anyone any good at figuring out whats wrong with a .sql file? I'm

    Extra eyes always helps here.

    Line 27: ; to , Change "27;" to "27,"
    Line 33: ; to , Change "were?';" to "were?',"
    Line 66: ; to '), Change "';" at end to "'),"

    When I say line 27, I mean the line that has 27 in it. (That's easier then trying to match up the actual line numbers).

    Take care,

    bugz

    ... Procrastination Day Has Been Postponed!
    ___ MultiMail/Linux v0.52

    --- Mystic BBS/QWK v1.12 A46 2020/08/11 (Linux/64)
    * Origin: BZ&BZ BBS (21:4/110)
  • From echicken@21:1/164 to Spectre on Thu Sep 24 09:48:36 2020
    Re: MySQL
    By: Spectre to Anybody on Thu Sep 24 2020 14:17:00

    Having 26 intact lines in the table, if I then export those looking to emulate its syntax, I still
    get the same result, 26 lines in, and error...

    Line 91 of the file (question ID 66) lacks a closing ) and ends with a semicolon instead of a comma. In other words, replace the ; at the end of the line with: ),

    Line 26 happens to be where that insert statement begins to span multiple lines ... which should be fine, but it depends on how you're feeding this into the DB.

    Hard to say without a more detailed error message.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    * Origin: electronic chicken bbs - bbs.electronicchicken.com (21:1/164)
  • From Spectre@21:3/101 to Everyone on Fri Sep 25 05:20:00 2020
    Thanks for looking it over... I always have trouble spotting the small syntactical errors....

    I guess what was throwing me was either trying to import it as an .sql via PHPmyAdmin or mysql -p trivia > file.sql the error was rather indeterminate. Something like 1065 (some range of obscure numbers), and a reference to an error on what I assumed was going to be 26 as 25 was the last to import, where it tells me to look for '' which isn't very helpful. At least not to me.

    Spec


    *** THE READER V4.50 [freeware]
    --- SuperBBS v1.17-3 (Eval)
    * Origin: Scrawled in haste at The Lower Planes (21:3/101)
  • From Spectre@21:3/101 to Anybody on Thu Sep 24 14:17:00 2020

    Anyone any good at figuring out whats wrong with a .sql file? I'm trying to import one for this fangled trivia quiz. I've never had much to do with SQL in general. Mostly leave it to PHPmyAdmin if I can. So far the best result I've managed is importing some 26 lines before it stops and tells me there's an error on line 1..

    Having 26 intact lines in the table, if I then export those looking to emulate its syntax, I still get the same result, 26 lines in, and error...

    I'll leave a copy of the .sql file hiding on

    tlp.zapto.org/hidden_stuff/trivia.sql

    All input appreciate...

    Ta, Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: (21:3/101)
  • From Spectre@21:3/101 to alterego on Thu Sep 24 18:37:00 2020
    I'll leave a copy of the .sql file hiding on tlp.zapto.org/hidden_stuff/trivia.sql

    I get a 404 for that file - did you work it out?

    Ahhh no, but I did get interrupted before I put the file in place :/ Its in place now.

    Spec


    --- SuperBBS v1.17-3 (Eval)
    * Origin: (21:3/101)