How to work with $_SERVER[\'QUERY_STRING\'] and pagination?
When my table is sorted by this link:
Don't use QueryString, just create a variable at the beginning of your script:
$pagerUrl = $_SERVER['PHP_SELF'].'?sort_name='.$_GET['sort_name']&sort=$_GET['sort'];
And use it in your link:
echo ''.$i.' ';