i am trying to execute the following code. but got this error: "mysql_result() [function.mysql-result]: Unable to jump to row 1 on MySQL result index 5" , the value at 0th index got print but remaining give give the error mentioned above. my code is:
$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;
}
can any please explain the error.