Update querylib.php