Fixing usage of mysql_unbuffered_query