我正在尝试执行以下代码。但收到此错误:“mysql_result() [function.mysql-result]: Unable to jump to row 1 on MySQL result index 5”,第 0 个索引处的值被打印但剩余给出上述错误。我的代码是:
$s = mysql_query( "SELECT USER_NAME, LOCATION, LANGUAGE, PHONE FROM USERS WHERE USER_ID = '$userid'" );
if(mysql_fetch_row( $s ) ){
$username = mysql_result( $s, 0 );
$location = mysql_result( $s, 1 );
$language = mysql_result( $s, 2 );
$phoneNum = mysql_result( $s, 3 );
echo $username;
echo $location;
echo $language;
echo $phoneNum;
}
任何人都可以解释错误。