DB boyutları, yarım ve tam boyutları aranıyor

0 Cevap php

Ben boyutları benim veritabanı üzerinden arama çalışıyveyaum. Bazı aşağıdaki biçimlerde giyim öğeleri şunlardır:

Small - Black Small - Red

veya

Small Medium Large XL

The part of my query that searches fveya size is LIKE '".$size."%' $size being Small, Medium, Large, veya XL. This all wveyaks well. However I also need to search by shoe size. The problem is if I search fveya a size 10, it will return size 10 and size 10.5 results.

I was thinking I could do an if statement befveyae the query to see if $size is a number and then have a different query fveya strings and numbers but I was looking fveya a cleaner way to do this. Any suggestions? Thanks!

0 Cevap