我已經創建了一個代碼,它已經正確顯示,但有時當客戶端命令時,它會給我一個如下的mysql錯誤代碼。代碼出現錯誤
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/florida/public_html/vieworder.php on line 39
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/florida/public_html/vieworder.php on line 40
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/florida/public_html/vieworder.php on line 41
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/florida/public_html/vieworder.php on line 42
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/florida/public_html/vieworder.php on line 43
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/florida/public_html/vieworder.php on line 44
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/florida/public_html/vieworder.php on line 45
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/florida/public_html/vieworder.php on line 46
一旦這些代碼到位,他們從查看訂單中刪除名稱,地址,電話號碼等會員信息。我已嘗試所有可能的選項,但我不知道什麼是我的代碼錯誤任何幫助將不勝感激。
我的代碼如下:
這種編碼是由錯誤給出的代碼。
$queryt = "SELECT * FROM MEMBERS WHERE MID = '$CUSTOMER' ";
$resultt = mysql_query($queryt) or die('Query failed: ' . mysql_error());
$numt=mysql_numrows($resultt);
$FIRSTNAME=mysql_result($resultt,$it,"FIRSTNAME");
$LASTNAME=mysql_result($resultt,$it,"LASTNAME");
$EMAIL=mysql_result($resultt,$it,"EMAIL");
$PHONE=mysql_result($resultt,$it,"PHONE");
$ADDRESS1=mysql_result($resultt,$it,"ADDRESS1");
$ADDRESS2=mysql_result($resultt,$it,"ADDRESS2");
$CITY=mysql_result($resultt,$it,"CITY");
$STATE=mysql_result($resultt,$it,"STATE");
?>
<? echo $FIRSTNAME?><br />
<? echo $LASTNAME?><br />
<? echo $EMAIL?><br />
<? echo $PHONE?><br />
<? echo $ADDRESS1?><br />
<? echo $ADDRESS2?><br />
<? echo $CITY?><br />
<? echo $STATE?><br />
<br />
<br />
也犯規和大家一起發生錯誤,很多成員可以訂購沒有任何錯誤的問題很好,但有些問題在隨機的時刻所以它不是同一個人。
您正在使用'$ it' - 但應引用'$ numt'。但是,** 0 **就足夠了。 – davidkonrad
'$ it'是什麼? – Albzi
$這是問題,但mysql_ *函數是你真正的問題......他們都貶值。你應該使用mysqli_ * –