Help Please

<?php $scores = new Pod("song_scores"); $whichsong = pods_url_variable('last'); $params = array(); $params['select'] = 't.name, t.score, t.date_played'; $params['where'] = 't.song_url LIKE "%'.$whichsong.'%"'; $params['limit'] = 10; $scores->findRecords($params); $total_scores = $scores->getTotalRows(); ?> <?php if($whichsong == "" || (strlen($whichsong)<3)){ echo '
'; echo "This tab displays scores only in the individual songs page."; echo '
Please click here to view the scores.'; echo '
'; } else{ if($total_scores>0){ echo '
'; echo '
Name
Score
Date Played
'; echo '
    '; while ( $scores->fetchRecord() ) { echo '
  1. ' . $scores->get_field("score") . '
    ' . $scores->get_field("date_played") . '
    '; } echo "
"; echo "
"; } else{ echo "No scores for this song has been uploaded yet."; } } ?>

please help me with this i wannt to sort the score from highest to lowest please

Hi there,

I don’t know if this would work, but from the looks of your mysql query method you could try:
[php]$params[‘where’] = ‘t.song_url LIKE "%’.$whichsong.’%"’;
$params[‘limit’] = 10;
$params[‘order’] = ‘t.score DESC’;
$scores->findRecords($params);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service