Can php query the results from a previous query?

前端 未结 5 846
梦如初夏
梦如初夏 2021-02-09 03:05

In some languages (ColdFusion comes to mind), you can run a query on the result set from a previous query. Is it possible to do something like that in php (with MySQL as the dat

5条回答
  •  离开以前
    2021-02-09 03:16

    Well, you may want to do this without touching the db:

    while($t = mysql_fetch_array($rs1)){
        if($t[name] == 'trout'){ 
            echo 'This is the one we\'re looking for!'; 
            break;
        }
    }
    

提交回复
热议问题