Jump to content

Query Help - Cube Cart


JakeSilver

Recommended Posts

Hi There,

 

I am trying to edit a cubecart script to order it by date. I know its a third party script but i think its more suitable in this section.

 

The code is as follows:

	$productListQuery = "SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory WHERE .$like";

} elseif($_GET['catId']=="saleItems" && $config['saleMode']>0) {

$productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE sale_price > 0 GROUP BY ".$glob['dbprefix']."CubeCart_inventory.productId";

} else {

$productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE ".$glob['dbprefix']."CubeCart_cats_idx.cat_id = ".$db->mySQLSafe($_GET['catId']);

}

 

Basically how can i add

 

ORDER BY `date` ASC

 

into each of the 3 instances of the query? As i have had difficulty figureing it out.

 

Many Thanks

Link to comment
https://forums.phpfreaks.com/topic/130262-query-help-cube-cart/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.