alwaysme Posted January 12, 2008 Share Posted January 12, 2008 hello i have php file like this <?php require('header2.php'); $query_mv = "SELECT * FROM pp_files WHERE approved='1' AND reject='0' ORDER BY ID DESC"; $result_mv = mysql_query($query_mv); while ($row_mv = mysql_fetch_assoc($result_mv)){ $videos_mv[] = $row_mv; } $smarty->assign('videos_mv', $videos_mv); // display results $smarty->display('index4.tpl'); SmartyPaginate::disconnect(); mysql_close($mysql_link); ?> the TPL file is this {section name=videos_mv loop=$videos_mv max=3} <a target="_parent" href="tv/videos.php?id={$videos_mv[videos_mv].id}"><img height='65' width='90' border='0' src="{$videos_mv[videos_mv].picture}" class="thumbnail" alt="{$videos_mv[videos_mv].name|truncate:38:'...'}" /></a> <br>{/section} this display 3 picture thumbnail order by ID, i want to do that by VIEWS too under it...i can accomplish that by change the -------> ID DESC"; to VIEWS DESC"; but how can i do both of them and make the output display 3 picture by ID and under it 3 picture by views in one file? Link to comment https://forums.phpfreaks.com/topic/85683-trying-to-merge-two-stuff/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.