Can you reuse a mysql result set in PHP?

后端 未结 2 658
小鲜肉
小鲜肉 2021-01-02 12:05

I have a result set I pull from a large database:

$result = mysql_query($sql);

I loop through this recordset once to pull specific bits of

2条回答
  •  粉色の甜心
    2021-01-02 12:51

    Use:

    mysql_data_seek($result, 0);
    

    You get this "free", since it's already buffered.

    As a separate note, you can explicitly do an unbuffered query with mysql_unbuffered_query.

提交回复
热议问题