Jump to content

trying to merge two stuff


alwaysme

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.