bonjour
j'ai retouche un code pour inserer un .csv dans du sql mais quand je tente de les rentrer dans la bdd j'ai des erreurs incomprehensibles
par contre lorsque je désactive les modules de la base de données , j'ai un retour de tableau correct
voici le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
j'ai essayé par le module d'enregistrement #1 mais j'ai cette erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
j'ai donc essayé la module d'enregistrement #2Erreur mise à jour table : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '$the_big_array[] INTO TABLE produits FIELDS TERMINATED BY ';' ENCLOSED BY...' at line 1
mais la aussi j'ai un message d'erreur :
nb : j'ai verifié db_connect la connection est bonne j'ai bien le echo en retourWarning: Trying to access array offset on value of type bool in /home/u320889525/domains/best-products.fr/public_html/importcsv.php on line 34
Warning: Trying to access array offset on value of type bool in /home/u320889525/domains/best-products.fr/public_html/importcsv.php on line 35
Warning: Trying to access array offset on value of type bool in /home/u320889525/domains/best-products.fr/public_html/importcsv.php on line 36
Fatal error: Uncaught Error: Call to a member function execute() on bool in /home/u320889525/domains/best-products.fr/public_html/importcsv.php:40 Stack trace: #0 {main} thrown in /home/u320889525/domains/best-products.fr/public_html/importcsv.php on line 40
version php ; 8.0

 

 
		
		 
         
 

 
			
			

 
   
 


 Insertion données en BdD
 Insertion données en BdD
				 Répondre avec citation
  Répondre avec citation
Partager