berrywoods - 2:39 pm on Feb 2, 2011 (gmt 0)
I have been messing around using left, right and LD to achive this and still not sure wheres best to go, basicly on our webshop, we have simular products. For Example
Dog Collar Black 10cm
Dog Collar Black 20cm
Dog Collar Black 30cm
Dog Collar Black 40cm
Sometimes the variable is at the front of the description
Dog Bed 20cm Black
Dog Bed 30cm Black
On our product page i have got php to group these together, if on say the Dog Collar Black 10cm page, a combo box will show the other 3 and link to them.
I want the listings page to only show 1 of these, remove the variable part. I plan to use php to change its price on the listing page to From £x.xx and the listing result would be basicly for every size avaliable.
So far i have used select distinct left(products_description,5)
this worked providing the variable is the first 5 letters. Is there any more efficent way of doing this. The list is sorted by the used based on price ect so i cant rely on php to do the leg work.