0
I am running the query in the database:
UPDATE store SET status = '0' WHERE id ='325'
And always returns true even if the value is not updated, and how much use the function mysqli_num_rows($link) of parameter error mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given,
The query is formed like this:
Update('store', array('status' => 0), "id ={$arr['store]['id']}'");
The parameters are: tabela, array campos=>valor and cláusula where
The function returns
truefor the query was successfully applied, regardless of whether or not you made the changes. Usemysqli_affected_rowsto check if any registry has been modified.– Valdeir Psr
Returns
truepq gave no error, if the database has autocommit turned off it will not save. To find out how many lines have been modified usemysqli_affected_rows($link)– rray
@Valdeirpsr lol I thought I had already tested with
mysqli_affected_rows, vlw!– Hebert Lima