我正在使用直接標籤SQL
在phpMyAdmin來執行我的查詢,但仍得到相同的錯誤Command out of sync error
這裏嵌套奎雷斯同步錯誤的是我的MySQL查詢我試圖執行:命令出來
SELECT `courses`.`id` as `courseId`,
`courses`.`Name` as `courseName`,
`course2teacher`.`TeacherId` as `teacherId`,
(SELECT user.name
FROM user,
(SELECT course2teacher.TeacherId as tid
FROM course2teacher,
user,
follows,
teachers
WHERE user.id = 10
AND user.id = follows.studentid
AND course2teacher.id = follows.course2teacherid) as
teach
WHERE teach.tid = user.id) as teacherName,
`assignments`.`Assignment#` AS `assignmentName`,
`assignments`.`DueDate` AS `duedate`,
`assignments`.`DueTime` AS `duetime`,
`assignments`.`expiryDate` AS `expiryDate`
FROM `teachers`,
`courses`,
`assignments`,
`course2teacher`,
`user`,
`follows`
WHERE `user`.`id` = '10'
AND `user`.`id` = `follows`.`studentid`
AND `follows`.`course2teacherid` = `assignments`.`course2teacherId`
AND `course2teacher`.`id` = `follows`.`course2teacherid`
這是我得到的錯誤消息:#2014 - Commands out of sync; you can't run this command now
爲什麼會出現這種情況,有什麼方法可以解決這個問題嗎?
phpMyAdmin的什麼版本? – eggyal
phpmyadmin的版本是4.0.10.14 –
我認爲,無論你如何切斷這個,它一定是phpMyAdmin中的一個錯誤 - 究竟是什麼情況觸發它,以及如何避免它們是不同的問題,但是... – eggyal