php如何从mysql最后一条数据向前读取
下面是代码,每次上传新的数据后都出现在网页最下面,如何让php从最后一行开始读取,求教<?php@mysql_connect("localhost","root","ro...
下面是代码,每次上传新的数据后都出现在网页最下面,如何让php从最后一行开始读取,求教
<?php
@mysql_connect("localhost","root","root")
or die("数据库服务器连接失败!");
@mysql_select_db("id2057017_vt")
or die("数据库不存在或不可用!");
$query=@mysql_query("select * from upimage")
or die("SQL语句执行失败");
echo "<br/><br/>";
echo "<table border=1>";
while($row = mysql_fetch_row($query))
{
$images=$row[0];$intr=$row[1];$link=$row[2];$prcfik=$row[3];$name=$row[4];$upname=$row[5];$time=$row[6];$download=$row[7];
echo "<div class='las'>";
echo "<div class='lase'><img src='$images' height='120px' width='120px' ></div>" ;
echo "<div class='lasd'>$prcfik$name</div>";
echo "<div class='lasc'>上传者: $upname</div> ";
echo "<div class='link'>下载地址:<a href='http://$link' target='_blank' >$link</a>下载次数:$download</div>";
echo "<div class='time'>上传时间:$time</div>";
echo "</div>";
}
echo "</table>";
?> 展开
<?php
@mysql_connect("localhost","root","root")
or die("数据库服务器连接失败!");
@mysql_select_db("id2057017_vt")
or die("数据库不存在或不可用!");
$query=@mysql_query("select * from upimage")
or die("SQL语句执行失败");
echo "<br/><br/>";
echo "<table border=1>";
while($row = mysql_fetch_row($query))
{
$images=$row[0];$intr=$row[1];$link=$row[2];$prcfik=$row[3];$name=$row[4];$upname=$row[5];$time=$row[6];$download=$row[7];
echo "<div class='las'>";
echo "<div class='lase'><img src='$images' height='120px' width='120px' ></div>" ;
echo "<div class='lasd'>$prcfik$name</div>";
echo "<div class='lasc'>上传者: $upname</div> ";
echo "<div class='link'>下载地址:<a href='http://$link' target='_blank' >$link</a>下载次数:$download</div>";
echo "<div class='time'>上传时间:$time</div>";
echo "</div>";
}
echo "</table>";
?> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |