|
|
|
Bookmark this page! We are having a HUGE 12 Days, 12 Deals Sale.
HURRY! Each deal lasts for 24 hours ONLY! |
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY bs.styleid' at line 49 SELECT p.productid, p.filename, p.sdescription, p.modelname, p.details, p.shipping_surcharge, p.specs
,p.inthebox, p.inthebox_filename, p.discontinued, IF(p.customizationTypeid > 0, 1, 0) as customizable
,if(CURDATE()>=p.displayon,0,1) as pdisplay, if(CURDATE()<=p.new,1,0) as new, shippingDate
,p.stepdowndesc, p.stepupdesc
,p.prewardamount, prewardtype, prewarddisplay
,m.mrewardamount, mrewardtype, mrewarddisplay
,if (p.displayCode>0, p.displayCode, m.displayCode) as displayCode
, m.filename as mfilename, m.manufacturer, m.list as mdisplay, m.auth_logo, m.auth_url, m.manufacturerid
,c.category, c.type, c.filename as cdir, c.lft, c.rgt, c.catid
, inv.baseprice, inv.stocknumber,
bs.weight, bs.style, bs.online, bs.styleid, bs.colorid, bs.mpn
,inv.*
, MIN(inv.listprice) as listprice, MIN(inv.baseprice) as baseprice, MIN(inv.saleprice) as saleprice
, MIN(inv.pricelevel1) as pricelevel1, inv.onsale, inv.stocknumber
#,inv.minq, inv.qoh, inv.totalsold, inv.qordered, inv.pricelevel2
, pt.saleend, pt.salestart
, dtv.numfree as directv_free, dtv.price as directv_price, dtv.maxreceivers as directv_max
, if(mc.mclength>0 , '1', '0') as custom
, if(bs.matrix='Y', '1', '0') as matrix
, st.styletype
, di.displayCode AS lineItemDisplayCode, li.internalId as nsInternalId
, di.invid as hiddenId, di.shipDate, di.leadTime
, IF( bv.vendorCode IS NULL , 0, 1 ) AS hasVendorLocations
FROM yew.products p
LEFT JOIN yew.products_bycat bc
ON p.productid=bc.productid
LEFT JOIN yew.product_categories c
ON bc.catid=c.catid
LEFT JOIN yew.product_manufacturers m
ON p.manufacturerid=m.manufacturerid
LEFT JOIN yew.products_bystyle bs
ON p.productid=bs.productid
LEFT JOIN yew.products_bydirectv dtv
ON bs.styleid=dtv.styleid
LEFT JOIN yew.inv
ON bs.stocknumber=inv.stocknumber
LEFT JOIN yew.ptable pt
ON inv.pricecode=pt.pricecode
LEFT JOIN yew.products_formcustom mc
ON p.productid=mc.productid
LEFT JOIN yew.products_bystyletype bst
ON p.productid=bst.productid
LEFT JOIN yew.product_styletypes st
ON st.styletypeid = bst.styletypeid
LEFT JOIN yew.distributorInventory di ON bs.styleid = di.styleid AND di.distributorid =1
LEFT JOIN netsuite.productLineItems li ON p.productid=li.productid
LEFT JOIN yew.invByVendor bv ON di.invid = bv.invid
WHERE p.productid=
GROUP BY bs.styleid |
|