Author Topic: Order search results  (Read 782 times)

0 Members and 1 Guest are viewing this topic.

Offline greg

  • New Users
  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Order search results
« on: March 05, 2014, 11:40:25 AM »
Hi,

I have an answer for the topic
http://jmbforumarchives.unofficialjmbsupport.com/index9a08-2.html?i=viewtopic/9375/


search.php line 88
$result = $DB->QueryWithPagination('SELECT * FROM `tx_galleries` WHERE ' . join(' AND ', $search_wheres), $search_binds, $page, $per_page);

By rand
$result = $DB->QueryWithPagination('SELECT * FROM `tx_galleries` WHERE ' . join(' AND ', $search_wheres) . ' ORDER BY RAND()' , $search_binds, $page, $per_page);

By date
$result = $DB->QueryWithPagination('SELECT * FROM `tx_galleries` WHERE ' . join(' AND ', $search_wheres) . ' ORDER BY `date_displayed`' , $search_binds, $page, $per_page);

...

Hoping that will help somebody ;)
« Last Edit: March 05, 2014, 11:42:26 AM by greg »

Unofficial JMB Support Forums

Order search results
« on: March 05, 2014, 11:40:25 AM »


 

Related Topics

  Subject / Started by Replies Last post
1 Replies
775 Views
Last post January 05, 2013, 08:22:10 AM
by Rockhound
0 Replies
866 Views
Last post July 18, 2013, 11:03:07 AM
by mrsshow
0 Replies
696 Views
Last post July 26, 2013, 10:36:56 PM
by MRB
2 Replies
2497 Views
Last post November 17, 2013, 11:35:05 PM
by Zealotry
0 Replies
1342 Views
Last post March 11, 2015, 02:23:42 PM
by scsi

anything