MySQL Error

Savanah44420 Posted messages 9 Status Membre -  
jordane45 Posted messages 30426 Registration date   Status Modérateur 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 réponses

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

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

0
astuces72 Posted messages 2146 Registration date   Status Membre Last intervention   1 669
 
why do you close ) every time?
try this:
VALUES
('****', '****', '****');
0
Savanah44420 Posted messages 9 Status Membre
 
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
astuces72 Posted messages 2146 Registration date   Status Membre Last intervention   1 669
 
You have resolved it, so it's all good?
0
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830
 
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
Savanah44420 Posted messages 9 Status Membre
 
It's done... it's done in Notepad++, my file...
And now, it gives me this....



That's a good one!!
0
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830
 
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
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830
 
The simplest thing would be for you to paste the entirety of your SQL script

NB: To post your code... please use the code tags.
Explanations available here: https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code
0