addDataParam('s', $date1); $dataParams->addDataParam('s', $date2); $rs = $wrapperObj->executeQuery($sql, $dataParams); if ($rs === false) { showierror($sql); } $sql .= ' ORDER BY ' . $order_by . ($sort_desc ? ' DESC' : ''); $sql .= !$no_url ? ' LIMIT ?, ?' : ''; if (!$no_url) { $dataParams->addDataParam('i', (($page - 1) * $pageRecord)); $dataParams->addDataParam('i', $pageRecord); } $prosp_label_result = $wrapperObj->executeQuery($sql, $dataParams); if ($prosp_label_result === false) { showierror($sql); } $sql = 'SELECT FOUND_ROWS() AS total'; $dataParams = new QueryData(); $total_count = $wrapperObj->executeQuery($sql, $dataParams); if ($total_count === false) { showierror($sql); } $total_count_row = $total_count[0]; $total = $total_count_row['total']; $pageNum = ceil($total/$pageRecord); $varTable = ' ' . (($no_url) ? 'UPC' : sortColumnHeader('UPC', 'upc', $url)) . ' ' . (($no_url) ? 'Total # of Tracks Ripped' : sortColumnHeader('Total # of Tracks Ripped', 's', $url)) . ' ' . (($no_url) ? 'Date Ripped' : sortColumnHeader('Date Ripped', 'encoding_date', $url)) . ' '; if (count($prosp_label_result) > 0) { $rci = 0; foreach ($prosp_label_result as $results) { $row_class = (++$rci & 1) ? '' : 'alt'; $varTable .= ' ' . ($no_url ? '"' . $results['display_upc'] . '"' : '' . $results['display_upc'] . '') . ' ' . $results['s'] . ' ' . $results['encoding_date'] . ' '; } } else { $varTable .= ' No Track Ripped from ' . $date1 . ' to ' . $date2 . '. '; } $varTable .= ' '; ?>