Use Single Row Query with MySQL and PHP

后端 未结 3 579
温柔的废话
温柔的废话 2021-01-20 18:15

say I have this

$result =  mysql_query(\'SELECT views FROM post ORDER BY views ASC\');

and I want to use the value at index 30 I assumed I

3条回答
  •  庸人自扰
    2021-01-20 18:44

    Are you sure there are 30 elements in $result? You might want to check to see if 30 > mysql_num_rows().

提交回复
热议问题