好的,我想知道如何让我的数据库表在某个时间发生变化。
例子 :
提交表单后1小时后自动更改为Prio 2 3小时后自动更改为Prio 3
这就是我需要的..
这是我用来读取表格的代码:
<?php
include("db.php");
$result=mysql_query("SELECT * FROM lijst where archief='0' ORDER BY FIND_IN_SET(prio, '#ffaeae,#fff5ae,#ffffff')");
while($test = mysql_fetch_array($result))
{
$id = $test['ticketID'];
echo"<tr style='background:". $test['prio'].";'>";
echo"<td><font color='black'>".$test['aangemeld']."</font></td>";
echo"<td>".$test['status']."</td>";
echo"<td><font color='black'>" .$test['klant']."</font></td>";
echo"<td><font color='black'>" .$test['naam']."</font></td>";
echo"<td><font color='black'>". $test['achternaam']. "</font></td>";
echo"<td><font color='black'>". $test['telefoon']. "</font></td>";
echo"<td><font color='black'>". $test['onderwerp']. "</font></td>";
echo"<td width='300px'><font color='black'>". $test['probleem']. "</font></td>";
echo"<td><font color='black'>". $test['terugb']. "</font></td>";
echo"<td><font color='black'>". $test['Tijd']. " door : ". $test['wijziging']. "</font></td>";
echo"<td><a href ='view.php?ticketID=$id'><small class='icon pencil'></small><span>Wijzig</span></a><br /><a href ='move.php?ticketID=$id'>Afgehandeld</a></td>";
echo "</tr>";
}
mysql_close($conn);
?>