Column count doesnt match value count at

Gestart doorSmiegles1 reacties42 weergaven

2 berichten · pagina 1 van 1

Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Beste ,

ik heb deze Query

[COLOR= #0000BB]<?php[/COLOR]
mysql[COLOR= #007700]::[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO winkel_items (naam,cat,prijs,img,health,power) 
    values
        ("[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]item_naam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"
        "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]item_catagorie[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]",
        "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]item_prijs[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]",
        "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]item_afbeelding[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]",
        "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]item_health[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]",
        "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]power[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"
        )"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR] ?>


en dit is mijn sql :

CREATE TABLE IF NOT EXISTS `winkel_items` (
  `id` int(11) NOT NULL auto_increment,
  `cat` varchar(255) NOT NULL,
  `naam` varchar(255) NOT NULL,
  `prijs` varchar(255) NOT NULL,
  `img` varchar(255) NOT NULL,
  `health` varchar(255) NOT NULL,
  `power` varchar(255) NOT NULL,
  `exp` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `geldig_tot` datetime NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


Iemand die het probleem weet?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
na item_naam staat er geen komma in de query. Daarom ziet hij het maar als 5 verschillende waardes, terwijl je er 6 probeerde te inserten.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren