file: /var/www/corecommerce/lib/framework/core/MySQLDatabase.class.php line: 122 message: Unknown column 'relevance' in 'order clause':select distinct(p.pID) as id, p.pID as productId ,p.pNum as productNumber, p.pSalesDate as salesDate, p.pSalesPrice as mySalesPrice, p.pPrice as myRegularPrice, p.discontinued, p.searchPriority, if(sbp.optionLowest is not null or sbp.personalizationLowest is not null, (if(sbp.optionLowest is not null, sbp.optionLowest, 0) + if(sbp.personalizationLowest is not null, sbp.personalizationLowest, 0) + if(p.pSale = "Y", if((p.pSalesDate is not null and p.pSalesDate != "0000-00-00" and p.pSalesDate <= curdate() and (p.pSalesEndDate is null or p.pSalesEndDate = "0000-00-00")) or (p.pSalesEndDate is not null and p.pSalesEndDate != "0000-00-00" and p.pSalesEndDate >= curdate() and (p.pSalesDate is null or p.pSalesDate = "0000-00-00")) or (p.pSalesDate is not null and p.pSalesDate != "0000-00-00" and p.pSalesDate <= curdate() and p.pSalesEndDate is not null and p.pSalesEndDate != "0000-00-00" and p.pSalesEndDate >= curdate()) or ((p.pSalesDate is null or p.pSalesDate = "0000-00-00") and (p.pSalesEndDate is null or p.pSalesEndDate = "0000-00-00")), if(p.pSalesPrice is not null, p.pSalesPrice, 0), if(p.pPrice is not null, p.pPrice, 0)), if(p.pPrice is not null, p.pPrice, 0)) ), if(p.pSale = "Y", if((p.pSalesDate is not null and p.pSalesDate != "0000-00-00" and p.pSalesDate <= curdate() and (p.pSalesEndDate is null or p.pSalesEndDate = "0000-00-00")) or (p.pSalesEndDate is not null and p.pSalesEndDate != "0000-00-00" and p.pSalesEndDate >= curdate() and (p.pSalesDate is null or p.pSalesDate = "0000-00-00")) or (p.pSalesDate is not null and p.pSalesDate != "0000-00-00" and p.pSalesDate <= curdate() and p.pSalesEndDate is not null and p.pSalesEndDate != "0000-00-00" and p.pSalesEndDate >= curdate()) or ((p.pSalesDate is null or p.pSalesDate = "0000-00-00") and (p.pSalesEndDate is null or p.pSalesEndDate = "0000-00-00")), if(p.pSalesPrice is not null, p.pSalesPrice, 0), if(p.pPrice is not null, p.pPrice, 0)), if(p.pPrice is not null, p.pPrice, 0)) ) as price, p.invTrack as trackInventory, p.invLevel as inventoryLevel, p.pSale as sale, p.pAvail as available, lp.pName as name ,pc.sortOrder as sortOrder ,p.pFeature as featured ,lp.pTeaser as teaser ,lp.pMobileTeaser as mobileTeaser ,pFlag as flag ,pCallEmailDisplay as callEmailDisplay ,pCallEmailDisplayPrice as callEmailDisplayPrice ,pAddToSeeSalePrice as addToSeeSalePrice ,v.venCompany as vendorName ,v.venID as vendorId ,p.ignoreDefaultImages ,p.allowLowerPriceRequest ,p.searchPriority ,p.showMsrpHideRetailPrice ,p.MSRP ,p.pSalesDate as salesDate ,p.pSalesEndDate as salesEndDate ,p.displayMSRPSavings ,p.slugStyle ,p.specialDeal from ds_products p left join ds_language_products lp on lp.pID = p.pID left join ds_product_categories pc on p.pID = pc.pID left join ds_language_categories lc on pc.catID = lc.catID left join ds_vendors v on p.venID = v.venID left join ds_product_option_sets os on os.productId = p.pID left join ds_product_personalizations pp2 on pp2.productId = p.pID left join ds_product_personalization_answers ppa on ppa.questionId = pp2.id left join ds_product_shop_by_prices sbp on (sbp.pID = p.pID and (sbp.pgID = "0" or sbp.pgID is null)) left join ds_product_group_pricing pgp on (pgp.pID = p.pID and pgp.pgID = "0") left join ds_page_content_products pcp on pcp.productId = p.pID where lp.langID = "1" and pFlag != 128 and pFlag != '1024' and pAvail = "Y" and pcp.pcId = "12" group by p.pID order by relevance desc ,p.pID asc limit 0, 99