Update query.inc.php

Incorrect variable name kills the order history update