두 번째 쿼리를 실행하여 부서를 선택하면 20 개 레코드와 같은 부서 목록을 반환하고 브라우저에 수천 명의 빈 enteries를 반환합니다. 브라우저에서 페이지가 멈 춥니 다. 잘못된?MySQL 쿼리 반환 수천 개의 빈 결과
mysql_select_db("ita", $con);
$results = mysql_query("SELECT * FROM `Colleges`");
$colleges = array();
while($row = mysql_fetch_assoc($results))
{
$colleges[] = array("Name" => $row['Name'], "Value" => $row['Value'], "ID" => $row['CollegeID']);
}
$collegecount = count($colleges);
$depts = array();
$result1 = mysql_query("SELECT * FROM `Departments` WHERE uid = `$uid`");
while($row = mysql_fetch_assoc($result1))
{
$depts = array("Name" => $row['Name'], "Value" => $row['Value'], "ID" => $row['CollegeID']);
}
$result = mysql_query("SELECT * FROM `users` WHERE wmuid = '$uid'");
while($row = mysql_fetch_assoc($result)){
//POPULATE FORM FIELDS FROM DB
당신이있는 것처럼 보이지 않는다 :
편집
또는 숫자 유형처럼 모두 따옴표를 제거 열
uid
저장하는 경우 우리에게 문제 코드를 보여줍니다. 페이지에 아무 것도 쓰지 않습니다. – Marvo사용자의 항목 수는 얼마입니까? – Randy