As i see your problem, its not a big problem, but why you suggest to move to compress the query string and change it to variable by value. Compress strategy is not always work properly. So if you describe you problem in your live site. then i will give another solution and solve the issue.
Please ping on chat and discuss with me.
I have 7 years of experience in PHP, Codeigniter, Yii and MySql