Don't escape sortorder if it is for RAND() or RANDOM()