Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Order user search results by mu.startdate › Reply To: Order user search results by mu.startdate
May 8, 2019 at 10:38 am
#22503
Participant
Hello Ernest, I can’t make it work; I’ve got this code under the last one; would you mind taking a look, please?
$theusers = $wpdb->get_results($sqlQuery);
$totalrows = $wpdb->get_var(“SELECT FOUND_ROWS() as found_rows”);
//update end to match totalrows if total rows is small
if($totalrows < $end)
$end = $totalrows;
$layout_cols = preg_replace(‘/[^0-9]/’, ”, $layout);
if(!empty($layout_cols))
$theusers_chunks = array_chunk($theusers, $layout_cols);
else
$theusers_chunks = array_chunk($theusers, 1);
ob_start();
Thank you,