запрос
| Код | $stmt = $conn->prepare("INSERT INTO `brands`(PartnerID, AffiliateID, UserName, Password, BrandName, BrandURL, BrandAPI, MinPayout, PlatformID, BrandImageURL, Stars, Priority, Countries, IsVisible) VALUES(:PartnerID, :AffiliateID, :UserName, :Password, :BrandName, :BrandURL, :BrandAPI, :MinPayout, :PlatformID, :BrandImageURL, :Stars, :Priority, :Countries :IsVisible)"); $stmt->execute(array( "PartnerID" => 2,//$partner, "AffiliateID" => 555, "UserName" => "poiuyt", "Password" => "dfdfdf", "BrandName" => "tessssttt", "BrandURL" => "www/dfddfd", "BrandAPI" => "dfdfdfdf", "MinPayout" => 33, "PlatformID" => 2, "BrandImageURL" => "lkjhgfdfghgfd", "Stars" => 5, "Priority" => 2, "Countries" => "ru", "IsVisible" => 1 ));
|
получаю ошибку: PHP| Цитата | Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1'
|
уже запрос из проложения выдрал в отдельный фаил. параметры забил хардом, всё таже фигня! чего ему для полного сщастья не хватает?
схема таблицы
| Код | CREATE TABLE IF NOT EXISTS `brands` ( `BrandID` int(11) NOT NULL AUTO_INCREMENT, `PartnerID` int(11) NOT NULL, `AffiliateID` int(11) NOT NULL, `UserName` varchar(50) NOT NULL, `Password` varchar(50) NOT NULL, `BrandName` varchar(50) NOT NULL, `BrandURL` longtext NOT NULL, `BrandAPI` longtext NOT NULL, `BrandJSON` longtext, `BrandAPIType` int(11) NOT NULL, `PlatformID` int(11) DEFAULT NULL, `Stars` int(11) DEFAULT '5', `Priority` int(11) DEFAULT '0', `BrandImageUrl` longtext, `AcceptUS` int(11) DEFAULT '0', `AcceptEU` int(11) DEFAULT '0', `AcceptNONEU` int(11) DEFAULT '0', `IsVisible` int(11) DEFAULT '1', `Countries` varchar(250) DEFAULT NULL, `BrandAutoLogin` longtext, `MinPayout` int(11) DEFAULT '74', PRIMARY KEY (`BrandID`), KEY `PlatformID` (`PlatformID`), KEY `BrandID` (`BrandID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=42 ;
|
|