<?php require_once('Connections/allianz.php'); ?>
<?php
mysql_select_db($database_allianz, $allianz); // 連線資料庫
$query_Recordset2 = " SELECT ";
$query_Recordset2.= " * ";
$query_Recordset2.= " ";
$query_Recordset2.= " from pictures where 1=1 order by pname ";
$Recordset2 = mysql_query($query_Recordset2, $allianz) or die(mysql_error()); // 執行查詢語法
$row_Recordset2 = mysql_fetch_assoc($Recordset2); // 把查詢的結果帶到$row_Recordset1[]陣列中
$totalRow_Recordset2 = mysql_num_rows($Recordset2); // 把查詢後表格總共有幾列(幾筆資料)放到 $totalRows_Recordset1
echo $totalRow_Recordset2 . "<BR>";
?>
<html>
<style>
.eachDiv{
width:200px;
height:200px;
float:left;
margin:10px;
}
.prod_box{
width:173px;
height:auto;
float:left;
padding:10px 10px 10px 11px;
}
.center_prod_box{
width:173px;
height: auto;
float:left;
text-align:center;
padding:0px;
margin:0px;
border:1px #F0F4F5 solid;
}
.product_title{
color:#ff8a00;
padding:5px 0 5px 0;
font-weight:bold;
}
.product_img{
padding:5px 0 5px 0;
}
.prod_price{
padding:5px 0 5px 0;
}
.prod_details_tab{
width:173px;
height:31px;
float:left;
margin:3px 0 0 0;
}
</style>
<body>
<?php
$i =1;
$idx =0;
$a = array();
do{
$a[$idx] .= $row_Recordset2["pname"] . "|";
if(
($i > 0) &&
($i % 3 == 0)
){
$idx = $idx +1;
}
$i++;
}while( $row_Recordset2 = mysql_fetch_assoc($Recordset2) );
echo "<table border =\"1\">";
for($i=0;$i<count($a);$i++){
echo $a[$i] . "<br>";
echo "<tr>";
echo "<td>" . $a[$i] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
</body>
</html>
<?php
mysql_select_db($database_allianz, $allianz); // 連線資料庫
$query_Recordset2 = " SELECT ";
$query_Recordset2.= " * ";
$query_Recordset2.= " ";
$query_Recordset2.= " from pictures where 1=1 order by pname ";
$Recordset2 = mysql_query($query_Recordset2, $allianz) or die(mysql_error()); // 執行查詢語法
$row_Recordset2 = mysql_fetch_assoc($Recordset2); // 把查詢的結果帶到$row_Recordset1[]陣列中
$totalRow_Recordset2 = mysql_num_rows($Recordset2); // 把查詢後表格總共有幾列(幾筆資料)放到 $totalRows_Recordset1
echo $totalRow_Recordset2 . "<BR>";
?>
<html>
<style>
.eachDiv{
width:200px;
height:200px;
float:left;
margin:10px;
}
.prod_box{
width:173px;
height:auto;
float:left;
padding:10px 10px 10px 11px;
}
.center_prod_box{
width:173px;
height: auto;
float:left;
text-align:center;
padding:0px;
margin:0px;
border:1px #F0F4F5 solid;
}
.product_title{
color:#ff8a00;
padding:5px 0 5px 0;
font-weight:bold;
}
.product_img{
padding:5px 0 5px 0;
}
.prod_price{
padding:5px 0 5px 0;
}
.prod_details_tab{
width:173px;
height:31px;
float:left;
margin:3px 0 0 0;
}
</style>
<body>
<?php
$i =1;
$idx =0;
$a = array();
do{
$a[$idx] .= $row_Recordset2["pname"] . "|";
if(
($i > 0) &&
($i % 3 == 0)
){
$idx = $idx +1;
}
$i++;
}while( $row_Recordset2 = mysql_fetch_assoc($Recordset2) );
echo "<table border =\"1\">";
for($i=0;$i<count($a);$i++){
echo $a[$i] . "<br>";
echo "<tr>";
echo "<td>" . $a[$i] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
</body>
</html>
0 意見 :
張貼留言