How to get one column of mysql_query results into an array?

前端 未结 4 591
误落风尘
误落风尘 2021-01-28 02:04

I\'m selecting a single column from a MySQL table with mysql_query(). Is there already a function for getting the results into an array, or will I have to iterate t

4条回答
  •  走了就别回头了
    2021-01-28 02:24

    You have to iterate.

    If you moved into the 21st century, and used mysqli, there's a mysqli_fetch_all() function.... and you'd be able to use prepared statements

提交回复
热议问题