Hi,
i have this code
the reason there are some that are almost duplicates (except the name LIKE 'letter%') is because this page is a search results page for about 5 options, above those 5 options, i want to be able to narrow the records by letter (hence the name LIKE 'letter%') anyway.....back to my question
lets say i only put this
it'll correctly show my records for an url like this: www.site.com/page.php?type=value&letter=value
HOWEVER
if i have it the way i have it now
the same url wont work, but the type would?
any ideas why?
i have this code
PHP Code:
SELECT *
FROM listing
WHERE type = 'coltype' OR
name LIKE '%quicksearch%' OR
(type = 'coltype' AND name LIKE 'letter%') OR
(address = 'estaddress' AND type = 'esttype' AND location = 'estlocation') OR (address = 'estaddress' AND type = 'esttype' AND location = 'estlocation' AND name LIKE 'letter%') OR
(location = 'locationbutton' AND type = 'locationtype') OR (location = 'locationbutton' AND type = 'locationtype' AND name LIKE 'letter%') OR
(name LIKE '%partialname%' AND type = 'partialtype') OR
(name LIKE '%partialname%' AND type = 'partialtype' AND name LIKE 'letter%') OR
(type LIKE '%advtype%' AND music LIKE '%advmusic%' AND location LIKE '%advlocation%' AND events LIKE '%advevents%' AND food LIKE '%advfood%') OR
(type LIKE '%advtype%' AND music LIKE '%advmusic%' AND location LIKE '%advlocation%' AND events LIKE '%advevents%' AND food LIKE '%advfood%' AND name LIKE 'letter%')
ORDER BY sqlorderby
lets say i only put this
PHP Code:
(type = 'coltype' AND name LIKE 'letter%')
HOWEVER
if i have it the way i have it now
PHP Code:
type = 'coltype' OR (type = 'coltype' AND name LIKE 'letter%')
any ideas why?
Comment