ORDER BY $sortby, .... not showing in correct order...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

User avatar
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: ORDER BY $sortby, .... not showing in correct order...

Post by Celauran »

simonmlewis wrote:Ok two issues.
1) at what point does it store the content of the variables that have been passed through the URL?
Not clear what you're asking here.
simonmlewis wrote:2) how do I clear the variable if I want to reset, using the powered=showall in the URL?

Code: Select all

    $query_params['powered'] = $_GET['powered'];
    if ($powered == "showall") { $query_params['powered'] = NULL;}
} elseif (isset($_SESSION['powered'])) {
    $query_params['powered'] = $_SESSION['powered'];
This doesn't do it.
$powered does not appear to even be defined. That aside, if $_GET['powered'] is 'showall' and you don't want to use that in your query, just unset the array key or don't set it in the first place.
Post Reply