If you execute
mysqli_multi() and later you try to
mysqli_result(), you may get the infamous error
Commands out of sync; you can't run this command
SQLSTATE: HY000). This happens because
you didn’t free all resultsets before executing another query.
But probably, you didn’t even know that any resultset exists,
because you executed statements like