Hay everyone need abit of help i a noob when it come to php :(
In my database i have a table called movies and i have 12 columns in there but i used 2 collumns for sorti
Just separate the columns with commas:
elseif($sortby == 'imdb_rating and year')
{
$order = 'ORDER BY `imbd_rating`, `year` DESC';
}
Alternatively, if you'd like to order them differently (for example by year and then rating), use:
ORDER BY `year` DESC, `imdb_rating` ASC
It's also worth noting that the mysql_*
set of function is now deprecated. It'd be better to use MySQLi or PDO.