Code: Select all
$query = "SELECT * FROM products WHERE catname = :cname AND pause = 'off' ORDER BY $sortby, rcstock = 'in stock' DESC, comingsoon = 'yes' DESC, rcstock = 'out of stock' DESC LIMIT $offset, $rowsPerPage;";Code: Select all
if (isset($sort))
{
if ($sort == "titleaz") { $sortby = "title ASC";}
if ($sort == "titleza") { $sortby = "title DESC";}
if ($sort == "pricelow") { $sortby = "price ASC";}
if ($sort == "pricehigh") { $sortby = "price DESC";}
}
Some are "in stock", but on one page it's got an Out of Stock product first!