A Database Error Occurred

Error Number: 1054

Unknown column 'WV' in 'where clause'

SELECT p.*,b.code_sap as producto_marca,(select url from image i where p.product_id=i.product_id order by image_id desc LIMIT 1) as url,b.name as ItmsGrpNam,prc.price,prc.currency,s.stock,s.stock_u,b.url_products,b.image as img_default,ncm_code,p.leadtime ,IF((select discount from discount d inner join prefix px on d.type_id=px.prefix_id where p.code_sap like (concat(px.prefix,'%') COLLATE utf8_unicode_ci) and px.brand_id=p.brand_id order by discount asc Limit 1)is null,0,(select discount from discount d inner join prefix px on d.type_id=px.prefix_id where p.code_sap like (concat(px.prefix,'%') COLLATE utf8_unicode_ci) and px.brand_id=p.brand_id order by discount asc Limit 1)) as discount_prefix FROM product p inner join brand b on p.brand_id=b.brand_id left join price prc ON p.product_id=prc.product_id left join stock s ON p.product_id=s.product_id WHERE p.status = 'ACTIVO' AND b.status = 'ACTIVO' AND p.product_id=WV-CF624P LIMIT 1

Filename: models/store/Products_model.php

Line Number: 925