|
|
|
ช่วยหน่อยครับ Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource |
|
|
|
|
|
|
|
Code (PHP)
<?
$UserId = $_SESSION["UserId"];
$sql = "select * from applicant where UserId = '$UserId'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$ApplicantId = $row["ApplicantId"];
$sql = "select * from family where ApplicantId = ApplicantId";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$sql = "select Level,Institution,Major,q.QuaName,Grade,Admission,Graduated from education e inner join qualification q on e.QuaId = q.QuaId";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$sql = "select * from experiences where ApplicantId = ApplicantId";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$sql = "select * from training where ApplicantId = ApplicantId";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$sql = "select l1.Language,SpeakLev,ListenLev,ReadLev,WriteLev from language l1 inner join langlevel l2 on l1.LandId = l2.LandId";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$sql = "select p1.Program,ProLev from program p1 inner join prolevel p2 on p1.ProId = p2.ProId";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
?>
มันขึ้น Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
ช่วยหน่อยครับ แก้ไขยังไงดีครับ
Tag : PHP
|
|
|
|
|
|
Date :
2014-02-22 11:42:09 |
By :
falcaoza |
View :
636 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$result = mysql_query($sql) or die(mysql_error());
ใส่แบบนี้ทุกบรรทัดครับ แล้วจะเห็น error
|
|
|
|
|
Date :
2014-02-22 12:08:05 |
By :
sakuraei |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ทุกบรรทัดที่มี
Code (PHP)
where ApplicantId = ApplicantId
ปรับให้เป็น
Code (PHP)
where ApplicantId = '$ApplicantId'
|
|
|
|
|
Date :
2014-02-22 12:17:11 |
By :
meannerss |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|