MySQL- Unable to jump to row 0 on MySQL result index

后端 未结 2 1238
失恋的感觉
失恋的感觉 2020-12-07 02:30

I have got an old site that has recently been displaying an error which is weird as its been untouched for some time. I get the following:

Unable to jump to          


        
2条回答
  •  难免孤独
    2020-12-07 02:34

    If I remember correctly, this error typically stems from a code segment like the following:

    // You probably have some code similar to this
    $var = mysql_result( $result, 0, 'column_name');
    

    Where either the query fails or the column doesn't exist. Check that $result is a valid MySQL resource to make sure that the SQL is valid, then make sure you're actually getting results from the database before trying to call mysql_result.

    Or, better yet, using mysql_fetch_array instead of manually fetching every column value (if you have multiple columns returned from the query).

提交回复
热议问题