Closed lamas525 closed 11 years ago
Finaly i have it.. issues was in usage " in order and addGroupBy (maybe more, but now its work) .. but sometimes i have issues with bad order.. but 90% of reflashes is order good
Hi,
Replace this : $mySearch->order("i_num_views", "DESC", DB_TABLE_PREFIX."t_item_stats");
With this one, sorry I made a mistake : $mySearch->order("total_views", "DESC");
Anyway, as I told you, the problem is that you need to made a sub-query, something like
SELECT * FROM (SELECT * FROM TABLE WHERE CONDITION) WHERE CONDITION)
And ... we're also doing a sub-query in every search, so it should be a sub-sub-query, which could be tricky, but I think that should work
I asked you for help before 3 days. you answered me with nice code.. it was cool.. ty ... it needed to fix somethink in this code but finaly i did it.. but still doesnt work. any idea? it filter items by category etc. but listings arent ordered.. any idea? Code is here: