Hi all,
Yes, everybody knows that mysqli_free_result() function frees the memory associated with the result. The mysqli_free_result function expects a mysqli_result object as it's parameter. Only mysqli_query calls using SELECT, SHOW, DESCRIBE or EXPLAIN queries will return such an object. Other type of query (including UPDATE) will return a boolean result, which does not need, and should not be, to be freed up using it.
So, if you use mysqli_free_result() for your last_login update, you will see the error like this:
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in...
That's also the reason why Antonio's small script test worked perfectly fine.
Eric P