Sir, I upload a youtube video src from my cms and need to display video on webpage. every thing is working fine.
Ehen I upload a data from cms ,every time new row is created in database.but i can not upload youtube video source with every record.
But I need to fetch last uploaded video source from database.
for ex-
In my database there are 5 rows.
Now i need to select last inserted souce from database.
for ex- I need to select row 3 source from database
id name source
1 raj //www.youtube.com/embed/zmotgOJDKXk
2 ravi
3 roy //www.youtube.com/embed/zmotgOJDKXk
4 martin
5 king
Below is my code to echo and select data
<?php
$sql="SELECT id ,source from content order by id desc";
$sub_top=mysql_query($sql);
?>
<?php while ($video= mysql_fetch_array($sub_top)) { ?>
<div class="video"> <iframe width="292" height="315" src="<?php echo $video['source']; ?>" frameborder="0" allowfullscreen></iframe></div>
<?php } ?>
</div>