【php开源代码栏目提醒】:网学会员为广大网友收集整理了,rule_order01.php,希望对大家有所帮助!
<?
$link = mysql_connect("localhost","root","0721");
//联机
mysql_query("use
webdata");
//选择数据库
$sql= "delete from order1 where ord_time = '$ord_time' ";
mysql_query($
sql);
$result = mysql_query("select * from order1 order by ord_time desc",$link);
//下 SQL 指令
/* 以
HTML Table 方式解析返回数据 */
echo "<table border=1>\n";
echo "<tr>\n";
/* 印出表头 */
while ($field =
mysql_fetch_field($result)) {
echo "<td>".$field->name."</td>\n";
}
echo "</tr>\n";
/* 印出表身 */
while ($row = mysql_fetch_row($result)) {
echo "<tr>\n";
for($i=0;$i<count($row);$i++){
echo "<td>".$row[$i]."</td>";
}
echo "</tr>\n";
}
echo "</tr>\n";
echo "</table>\n";
/* 释放 result */
mysql_free_result($result);
/* 关闭连结 */
mysql_close($link);
?><style type="text/css">
<!--
body {
background-color: #CC0000;
}
-->
</style>
删除成功,<a href="rule.php">回上一页</a>