如何为已从数据库中获取数据的表生成数字,这是我的情况:
//动作文件调用数据
$loads = array();
$loadno = $_GET['eig'];
$result = mysql_query("SELECT * FROM task_load WHERE load_no='$loadno' ORDER BY inv ASC");
while($row = mysql_fetch_assoc($result))
{
$loads[] = new VerifyLoads($row);
}
foreach($loads as $c){
echo $c->markup_print();
}
// 类文件接收请求
public function markup_print()
{
$d = &$this->data;
return '
<tr id="line-'.$d['id'].'">
<td class="iprint">'.GENERATE_NUMBER_HERE.'</td>
<td class="cprint">'.$d['customer_name'].'</td>
<td class="cprint">'.$d['inv'].'</td>
<td class="rprint">'.$d['value'].'</td>
<td class="cprint">'.$d['ctn'].'</td>
<td class="iprint"></td>
<td class="iprint"></td>
<td class="iprint"></td>
</tr>
';
}