Select and Update in same query

前端 未结 3 1344
野的像风
野的像风 2021-01-13 05:49

Can you select and update in the same query? I\'m trying to count views to create a top blog posts by views for my sidebar.

$sql = mysql_query(\"SELECT * FRO         


        
3条回答
  •  情话喂你
    2021-01-13 06:12

    Basically, NO, you cannot SELECT and UPDATE with the same query. Your only option would be to write a STORED PROCEDURE which is a more advanced technique of database interaction.

提交回复
热议问题