skyer2000 Posted March 9, 2007 Share Posted March 9, 2007 Right now i'm trying to figure out a good way to have a single php file handle many different types of sorting. For example, sometimes from _GET the page will display by category and by user. Other times, it may just be by user, or other times when there is no _GET, it displays everything. The thing I can't think of is how the query can handle these multiple WHERE clauses, even when the clauses may not exist at certain times the page is pulled up. I tried something like the following: WHERE $category, $user. However, when $user is null, it breaks because of the extra comma. If the explanation is long, can someone point me to a good resource on doing this? Thanks! Link to comment https://forums.phpfreaks.com/topic/42018-best-way-to-handle-sorting/ Share on other sites More sharing options...
Barand Posted March 9, 2007 Share Posted March 9, 2007 See my preferred method http://www.phpfreaks.com/forums/index.php/topic,89842.msg360739.html#msg360739 Link to comment https://forums.phpfreaks.com/topic/42018-best-way-to-handle-sorting/#findComment-203908 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.