mysql_affected_rows will result in any of the actual changes (potentially more; I believe that affected changes will also deal with the cascade count changes). Inserts, deletes and updates will all require affected rows to determine changes; selects, describes, etc, would make use of num_rows. MySQLi has a procedural equivalence to mysql, but they are not compatible together. Signatures are different between the libraries. MySQL usually allows the connection as an option (since for whatever reason they've globalized the resource), but it would be last argument. MySQLi requires the connection as its first argument or handled as an object.
This is why with even procedural calls I recommend abstract functionality to stand between. You can't just swap out your storage drivers, you need to rewrite any code that uses the old storage drivers. If you had written the abstract functionality required, then you'd simply update a (hopefully) single inclusion to point at the file with the new functionality instead of the old.