好的,我有这个代码:
<?
$name=$_POST['name'];
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("juliver", $con);
$result = mysql_query("SELECT * FROM items WHERE id='$name'");
$ss = ""
while($row = mysql_fetch_array($result))
{
$ss .= "<div style='border:1px solid red; float:left; width:100px;'><img src="Images/media'.$row['name'].'" />";
$ss .= "<p>".$row['title']."</p>";
$ss .= "<p>".$row['description']."</p>";
$ss .= "<a href='".$row['link']."'>".$row['link']."</a></div>";
}
mysql_close($con);
?>
<? echo $ss; ?>
现在,我想组织显示,因此,我希望记录设置为 3,但我卡住的唯一问题是我不知道如何让它以 3 组显示。我愿意提出建议,请帮我。谢谢你。