I can't seem to get reliable results after deleting a row(s) using mysqli. The afftect_rows is always 0.
I'm using php5.2 and the mysqli method
Something like this:
$sql = " DELETE FROM classRoster WHERE id=123 "; if ($result = $this->mysqli->query($sql)) { return $this->mysqli->affected_rows; ///ALWAYS RETURNS 0 }else{ //log error }
I have confirmed that the row is in fact deleted, but still get 0 as affected_rows. Please help!