the web script file that I’m trying to modify shows this:
$get_videos = $db->rawQuery("SELECT DISTINCT(v.id), v.* FROM u_paid_videos AS upv LEFT JOIN " . T_VIDEOS . " AS v ON (upv.id_video = v.id) WHERE upv.id_user = {$user->id} ORDER BY upv.id DESC");
which work with this:
if (!empty($get_videos)) {
$len = count($get_videos);
foreach ($get_videos as $key => $video) {
$video = PT_GetVideoByID($video, 0, 0, 0);
$pt->last_video = false;
if ($key == $len - 1) {
$pt->last_video = true;
}
$final .= PT_LoadPage('paid-videos/list', array(
'ID' => $video->id,
'USER_DATA' => $video->owner,
'THUMBNAIL' => $video->thumbnail,
'URL' => $video->url,
'TITLE' => $video->title,
'DESC' => $video->markup_description,
'VIEWS' => $video->views,
'VIEWS_NUM' => number_format($video->views),
'TIME' => $video->time_ago
//'DURATION' => $video->duration
));
}
}
if (empty($final)) {
$final = $list;
}
$pt->videos = $get_videos;
$pt->page = 'paid-videos';
$pt->title = $lang->search . ' | ' . $pt->config->title;
$pt->description = $pt->config->description;
$pt->keyword = $pt->config->keyword;
$pt->content = PT_LoadPage('paid-videos/content', array(
'VIDEOS' => $final,
'KEYWORD' => $keyword
));
which successfully displays the list of purchases on the ‘purchases’ html page.
I tried to add ‘time_date’ (purchase date) to that line like this:
$get_videos = $db->rawQuery("SELECT DISTINCT(v.id), v.* FROM u_paid_videos AS upv LEFT JOIN " . T_VIDEOS . " AS v ON (upv.id_video = v.id) WHERE upv.id_user = {$user->id} AND upv.time_date ORDER BY upv.id DESC");
and changed to:
'TIME' => $video->time_date
Those changes successfully add the ‘time_date’ to the html page, but as a result of that change the displayed list on the ‘purchases’ html page are not the same list as before the changes. (I can’t really determine a common reason why these new displayed videos are on that page - as a result of that change).
Ideally, I’d like the ‘purchases’ to be displayed in order on latest purchase date.
Any assistance will be appreciated.