php列出数据库中数据
<?php
$row = $rows = array();
$sql=mysql_query("SELECT * FROM shouzhi ORDER BY shouzhi_time DESC");
$total = mysql_num_rows($sql);
while($row = mysql_fetch_array($sql) ){
$rows[]=$row;
}
/* print_r($rows);
echo '<hr>';
for ($i=$total-1; $i<$total & $i>=0; $i--){
echo date('ym',strtotime('-1 month' .$rows[$i]['shouzhi_riqi'])).',';
echo $rows[$i]['shouzhi_shou'].',';}
echo '<hr>';
echo $rows['0']['shouzhi_riqi'].$rows['0']['shouzhi_yu'];
echo $total; */
?>