vave
Полезный
- Регистрация
- 22 Июн 2007
- Сообщения
- 467
- Реакции
- 16
- Автор темы
- #21
Вот что показывает:
SELECT * FROM listings WHERE (category='Painting' OR category2='Painting') AND hide!='1' AND (expire>'1251632626' OR expire='' OR expire='0') AND (user_expire>'1251632626' OR user_expire='' OR user_expire='0') ORDER BY make ASC LIMIT 0, 10
вот вторая категория
SELECT * FROM listings WHERE (category='Works on paper' OR category2='Works on paper') AND hide!='1' AND (expire>'1251633194' OR expire='' OR expire='0') AND (user_expire>'1251633194' OR user_expire='' OR user_expire='0') ORDER BY make ASC LIMIT 0, 10
а вот эта не должна входить в результат поиска
SELECT * FROM listings WHERE (category='Our Museum' OR category2='Our Museum') AND hide!='1' AND (expire>'1251633267' OR expire='' OR expire='0') AND (user_expire>'1251633267' OR user_expire='' OR user_expire='0') ORDER BY make ASC LIMIT 0, 10
SELECT * FROM listings WHERE (category='Painting' OR category2='Painting') AND hide!='1' AND (expire>'1251632626' OR expire='' OR expire='0') AND (user_expire>'1251632626' OR user_expire='' OR user_expire='0') ORDER BY make ASC LIMIT 0, 10
вот вторая категория
SELECT * FROM listings WHERE (category='Works on paper' OR category2='Works on paper') AND hide!='1' AND (expire>'1251633194' OR expire='' OR expire='0') AND (user_expire>'1251633194' OR user_expire='' OR user_expire='0') ORDER BY make ASC LIMIT 0, 10
а вот эта не должна входить в результат поиска
SELECT * FROM listings WHERE (category='Our Museum' OR category2='Our Museum') AND hide!='1' AND (expire>'1251633267' OR expire='' OR expire='0') AND (user_expire>'1251633267' OR user_expire='' OR user_expire='0') ORDER BY make ASC LIMIT 0, 10