Can PDO rowCount() after UPDATE query show difference between “no changes made” and “unexisting row”?

后端 未结 2 1250
梦如初夏
梦如初夏 2021-01-12 16:40

I\'m doing an update query with PDO. I would like to figure out if my update query did not change anything in the database, since:

  1. the passed values are the sa
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-12 17:05

    You could add conditionals to your 'where' clause so such as " and ColumnToUpdate <> 'NewValue'"

提交回复
热议问题