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