The query is written in a way where I can't really add something to it, here is the part of the code that I'm talking about:
$query = "SELECT `playerID`, `username`, `online`, `upgrade` FROM `players` WHERE 1"; if($username) $query.=" AND `username` = '$username'"; if($id) $query.=" AND `playerID` = '$id'"; $result = mysql_query($query);
To do pagination I would need to make the query like this:
$max_results = 10; $from = (($page * $max_results) - $max_results); $result = mysql_query("SELECT row FROM table WHERE condition LIMIT $from, $max_results");
But as you can see I am kinda stuck having to make my $reslut query look like this:
$result = mysql_query($query);
I can't add 'LIMIT $from, $max_results' anywhere after the mysql_query($query).
I am sure there is a way, I just can't figure it out. Any help is appreciated =) Thanks