好的,所以我已经从这个开始了一个小时,它说“无效的参数号:绑定变量的数量与...中的令牌数量不匹配”我把它们数出来了,它们是对的。有任何想法吗?
$sql="insert into myTable (TicketID ,Priority, Status, Summary, Description, Category, Customer,
AssignedGroup, AssignedTo, OpenedDate, ResolvedDate, ClosedDate, FinalDescription, RootCause, ResolutionCode)
values(:tid,:pri,:stat,:summ,:descr,:cat,:cus,:assG,:assT,:opnDate,:resDate,:cloDate:,finDesc,:root,:resCode)";
$stmt=$dbh->prepare($sql);
$stmt->bindParam(':tid', $data[0]);
$stmt->bindParam(':pri', $data[1]);
$stmt->bindParam(':stat', $data[2]);
$stmt->bindParam(':summ', $data[3]);
$stmt->bindParam(':descr', $data[4]);
$stmt->bindParam(':cat', $data[5]);
$stmt->bindParam(':cus', $data[6]);
$stmt->bindParam(':assG', $data[7]);
$stmt->bindParam(':assT', $data[8]);
$stmt->bindParam(':opnDate', $Odate);
$stmt->bindParam(':resDate', $RDate);
$stmt->bindParam(':cloDate', $CDate);
$stmt->bindParam(':finDesc', $data[12]);
$stmt->bindParam(':root', $data[13]);
$stmt->bindParam(':resCode', $data[14]);
try{
$stmt->execute();
$stmt->closeCursor();