相关文章推荐,获取随机文章推荐,帮看看这个代码对不对
$sql = "SELECT * FROM `shops` WHERE `subdomain` != '' ORDER BY RAND() LIMIT 100";
$rows = $db->getData($sql);
foreach($rows as $row)
{
echo '<li><a href="http://'.$row['subdomain'].'.baidu.com/" title="'.$row['title'].'">'.$row['title'].'</a></li>';
}