|
|
|
สอบถามเรื่องการทำ Multiple Rows and Column ใน css+php+mysql |
|
|
|
|
|
|
|
Code (PHP)
<html>
<head>
<title>ThaiCreate.Com Tutorial</title>
</head>
<body>
<?
$objConnect = mysql_connect("localhost","root","root") or die(mysql_error());
$objDB = mysql_select_db("mydatabase");
$strSQL = "SELECT * FROM gallery";
$objQuery = mysql_query($strSQL);
echo"<div class=\"grids_of_3\">";
$intRows = 0;
while($objResult = mysql_fetch_array($objQuery))
{
$intRows++;
?>
<div class="grid1_of_3">
<a href="details.html">
<img src="web/images/w_pic1.jpg" alt=""/>
<h3>branded handbags</h3>
<div class="price">
<h4>$299<span>indulge</span></h4>
</div>
<span class="b_btm"></span>
</a>
</div>
<div class="clear"></div>
<?
if(($intRows)%3==0)
{
echo"</div>";
echo"<div class=\"grids_of_3\">";
}
}
?>
</body>
</html>
<?
mysql_close($objConnect);
?>
|
|
|
|
|
Date :
2014-06-10 10:29:56 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณมากครับ
|
|
|
|
|
Date :
2014-06-10 11:27:42 |
By :
keyword2015 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณมากครับ ทำได้แล้ว
|
|
|
|
|
Date :
2014-06-10 12:04:10 |
By :
keyword2015 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
จัดไปครับ
|
|
|
|
|
Date :
2014-06-10 12:11:08 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|