Код:
<?php
mysql_connect("localhost","root","пасс")or die(mysql_error());
mysql_select_db("датабаза");
$mysql = mysql_query("SELECT * FROM songs ORDER BY id DESC LIMIT 10");
echo'<table><tr>';
while($row = mysql_fetch_array($mysql)){
if(strlen($row[title]) > 7){$text = substr($row[title],0,7); $title = "$text...";}
else{$title = $row[title];}
echo"<tr><td><img src=\"images/lastsong.gif\"><a href=\"playsong.php?id=$row[id]\">
$row[artist] - $title </a></td></tr>";
}
echo'</tr></table>';
?>