Hello all
I have a catalog, and In the database I put a Prio field, and put a order by prio ASC in my sql so products show in order that I have specified my in my prio field, going from 1 to whatever number of products in that brand.
I have my datatype as Variant, obviously this is wrong, what should be my datatype for this field?
Here is my SQL:
$strSQL =
"SELECT DISTINCT
prod.Produit_ID AS prodId,
prod.Is_New AS newProduct,
prod.Is_Award_Winner AS awardProd,
prod.Nom AS prodName,
prod.img_thumb_1 AS prodThmImg,
prod.img_pop_1 AS prodPopUpImg,
prod.SKU AS prodSKU,
prod.Number_Piece_Range_ID AS piecesId,
prod.Price_Range_id AS priceId,
prod.subCat AS subCat,
prod.List_Group_Age_ID AS ageId,
prod.prio AS priority
FROM
Produit2 AS prod,
Groupe_Age AS age
WHERE
".$whereClause."
ORDER BY prod.priority ASC
". $limit;
$q = new Query();
$q->setSQL($strSQL);
return $q;
}
It's not a live site, it's on an extranet, but why isn't this working?
Product with number 11 as prio shows up second for some reason.
I would apreciate any help, thanks