mysql fetch assoc VS mysql fetch array

后端 未结 10 1855
太阳男子
太阳男子 2020-12-10 04:10

Below are two methods commonly used in most php codes for fetch mysql data .

  1. mysql_fetch_array()
  2. mysql_fetch_assoc()
  3. <
10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-10 05:07

    Well http://php.net/manual/en/function.mysql-fetch-assoc.php states

    Note: Performance

    An important thing to note is that using mysql_fetch_assoc() is not significantly slower than using mysql_fetch_row(), while it provides a significant added value.

    So the difference shouldn't be something to worry about.

提交回复
热议问题