0

我在代码的这一部分(发布在下面)中收到错误“列数与第 1 行的值数不匹配”,我不知道为什么。如果您对如何解决此问题有任何见解,请告诉我

$sql="INSERT INTO Boatsales (Dealer, Model, Floorplan, Tubedia, Centtubedia, Intcolor, Wallcolor, 2ndWallcolor, Furncolor, Prerig, 

电机, 椅子, Waveglider, Fivesevenpackage, Waveshield, Hpp, Vinylteak, Vinylfloor, Snapcarpet, Garmin200, Garmin500, Garmin431, Sidekeel, Skitow, Helmraised, Privacystation, Platinumpackage, Skistorage, Playpencover, Seatcover, Mooringcover, Dualbimini, Docklight, Underwaterlight, Moodlight,交货,备注)

VALUES ('$Dealer',

'$Model', '$Floorplan', '$Tubedia', '$Centtubedia', '$Intcolor', '$Wallcolor', '$SecondWallcolor', '$Furncolor', '$Prerig', '$Motor', '$Chair','$Waveglider','$fivesevenpackage','$Waveshield','$Hpp','$Vinylteak','$Vinylfloor','$Snapcarpet','$Garmin200','$Garmin500', '$Garmin431', '$Sidekeel', '$Skitow', '$Helmraised', '$Privacystation', '$Platinumpackage', '$Skistorage', '$Playpencover', '$Seatcover', '$Mooringcover', '$Dualbimini', '$Docklight', '$Underwaterlight', '$Moodlight' '$Delivery', '$Motor')";

4

1 回答 1

0

你在后面少了一个逗号'$Moodlight'

另外,强烈考虑使用准备好的语句: http: //php.net/manual/en/pdo.prepared-statements.php

于 2013-07-10T20:47:03.973 回答