medoo return value problem
红色熊猫
红色熊猫 2019-07-26 11:00:05
0
1
1218

20190726105437.png


QQ图片20190726105547.png




#This update operation returns the number of rows in the result $data and $data->rowCount(); what is the difference? Aren’t they both returning influence functions?


In addition: medoo update operation,

Update successful:

If the data changes, return the number of rows $data=1

If the data does not change, the number of rows returned $data=0;

Update failure:

The number of rows returned $data is also 0. How to make if judgment, update failure and update success ( (data has not changed) the return value is the same, how to write the judgment

红色熊猫
红色熊猫

reply all(1)
Peter-Zhu

update() performs an update operation, then the affected record stored in $data is not a PDO object;

rowCound() should be called on the pdo object;


Please check the $data type, var_dump() or gettype()

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template