PDO参数号无效:未定义参数

时间:2013-06-11 22:26:04

标签: php mysql select pdo

这是我的插入声明:

$checkLessonResult = $db->prepare("SELECT * FROM lesson_results WHERE userTestID=:userTestID AND userID=:userID AND testID=:testID AND lessonID=:LessonID");

$checkLessonResult->execute(array(':userTestID' => $userTestID, ':userID' => $userID, ':testID' => $testID, ':lessonID' => $lessonID2));

我收到此错误:

 Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: parameter was not defined' in C:\xampp\htdocs\Tick\5\index.php:1241 Stack trace: #0 C:\xampp\htdocs\Tick\5\index.php(1241): PDOStatement->execute(Array) #1 {main} thrown in C:\xampp\htdocs\Tick\5\index.php on line 1241

我的错误是什么?

0 个答案:

没有答案