use mysql_affacted_rows() in combination with DB::affectedRows, as DB::affectedRows is not reliable. 2. take control of query ordering - provide a new hook call