MySQL Error

Savanah44420 Posted messages 9 Status Member -  
jordane45 Posted messages 30427 Registration date   Status Moderator Last intervention   -
Hello

I am going step by step through a tutorial on databases, but I am encountering a problem with importing the SQL file into the database. It keeps returning an error #1064.

I have searched and searched, but I can't find the error !! Totally clueless about coding, I am completely lost right now !! Smiley bawling

Thank you for your help



Here is the file in question:
http://fille2lair.fr/PROVISOIRE/fichier_produits.sql

2 answers

  1. astuces72 Posted messages 2146 Registration date   Status Member Last intervention   1 669
     
    slt

    ça donne quoi en enlevant la virgule après name ?
    ('id' 'name')
    0
    1. Savanah44420 Posted messages 9 Status Member
       
      It's not getting anywhere...same old story!! Pfffff
      0
    2. Savanah44420 Posted messages 9 Status Member
       
      Sorry....this gives:

      0
    3. astuces72 Posted messages 2146 Registration date   Status Member Last intervention   1 669
       
      why do you close ) every time?
      try this:
      VALUES
      ('****', '****', '****');
      0
    4. Savanah44420 Posted messages 9 Status Member
       
      INSERT INTO `categories` (`id`,`name`) VALUES (1, 'Natural Salts'), (2, 'Aromatized Flower of Salt'), (3, 'Spiced Salts'), (4, 'Products from the Marshes'), (5, 'Wellness'), (6, 'To Give');


      I don't know, it was written like that in the source files...
      0
    5. astuces72 Posted messages 2146 Registration date   Status Member Last intervention   1 669
       
      You have resolved it, so it's all good?
      0
  2. jordane45 Posted messages 30427 Registration date   Status Moderator Last intervention   4 831
     
    Hello,

    Start by copying your SQL query code into a notepad++ and make sure your file is in utf8 without BOM
    Then, delete all the lines that are comments (everything that starts with /* or -- )

    --
    Best regards,
    Jordane
    0
    1. Savanah44420 Posted messages 9 Status Member
       
      It's done... it's done in Notepad++, my file...
      And now, it gives me this....



      That's a good one!!
      0
    2. jordane45 Posted messages 30427 Registration date   Status Moderator Last intervention   4 831
       
      Well.. it’s just that the table hasn't been created yet...
      so you need to run the query where it says .. CREATE TABLE ..[the name of the table...]....
      0