php - Getting the number of affected rows including those not changed -


i doing statement this:

update tbl set x = 1 y = 2 

and using rowcount pdo whether or not row changed (y unique, either none or 1 row updated). isn't need though, since, using previous example, if x already 1, rowcount() 0 since no row changed previous value. need know whether row matched where clause.

is there way without doing query?

it turns out pdo has thing: pdo::mysql_attr_found_rows.


Comments

Popular posts from this blog

rest - Spring boot: Request method 'PUT' not supported -

php - Magento - Deleted Base url key -

symfony - imagine_filter() not generating the correct url in LiipImagineBundle -