0
我有一個明顯被別人看到的情況,但沒有一個建議的解決方案似乎適用於我的情況。PHP vs MySQL Workbench:同樣的查詢,不同的結果
MySQL查詢
select a.assessmentscheduledID, a.assessmentscheduledHVID, a.assessmentscheduledChildID, a.assessmentscheduledType, a.assessmentscheduledAssessmentID, a.assessmentscheduledDateSubmitted, b.pcnpyCurricYearID, b.pcnpyCurricLang from `hhpip_chairs`.tblAssessmentsScheduled a, `hhpip_chairs`.tblPCNPY b where a.assessmentscheduledAAStatus = 2 and a.assessmentscheduledAADistYN = 0 and a.assessmentscheduledChildID= b.pcnpyChildID;
在工作臺此查詢164條記錄。
PHP代碼
$getassessout = "select a.assessmentscheduledID, a.assessmentscheduledHVID, a.assessmentscheduledChildID, a.assessmentscheduledType, a.assessmentscheduledAssessmentID, a.assessmentscheduledDateSubmitted, b.pcnpyCurricYearID, b.pcnpyCurricLang from tblAssessmentsScheduled a, tblPCNPY b where a.assessmentscheduledAAStatus = 2 and a.assessmentscheduledAADistYN = 0 and b.pcnpyChildID = a.assessmentscheduledChildID";
$getassessoutresults = $mysqli->query($getassessout) or trigger_error("<p class=\"error\">We're very sorry, but an error has occurred when interacting with the CHAIRS database. Please try again and see if the error repeats. If it does, please get the following information in its entirety to your database administrator so the CHAIRS developer can get the error resolved.<br />Error Message: " . $mysqli->error, E_USER_ERROR);
當這個代碼在我的網頁上運行,我回來152條記錄。任何想法爲什麼這可能是這種情況?