alwaysme Posted January 9, 2008 Share Posted January 9, 2008 hi ppl i have script that is in mysite.com/script/index.php. someone so nice on the net made a craetion for me to display most viewed little pic (thumb) on that index page. it works well and everything is function great. The code he added for me is told me to place the code below into the script directory with rest of the php code $query_mv = "SELECT * FROM pp_files WHERE approved='1' AND reject='0' ORDER BY views 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); the other part is {section name=videos_mv loop=$videos_mv max=3} <a href="videos.php?id={$videos_mv[videos_mv].id}"><img height='89' width='120' src="{$videos_mv[videos_mv].picture}" class="thumbnail" alt="thumbnail" /></a> {/section} {include file="footer.tpl"} to place in the index.tpl file of the script directory it works very great. But i want that display the latest one added not the views....how can i become to that? Quote Link to comment https://forums.phpfreaks.com/topic/85242-require-help-on-script/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.