这是我输出的代码
<?php
$data = mysql_query("select * from request, users where request.user_id = users.id and request.user_id = $user_id") or die(mysql_error());
Print "<table border cellpadding=3>";
while($info = mysql_fetch_array( $data ))
{
Print "<tr class='my_loans_tr'>";
print "<td class='detail'>" .$info['loan_id'] . "</td> ";
Print " <td class='admin_amount'>".$info['amount'] . "</td> ";
Print " <td class='admin_points'>".$info['points'] . "</td> ";
Print " <td class='admin_date'>".$info['req_date'] . " </td>";
Print " <td class='admin_status'>".$info['status'] . " </td>";
Print " <td class='admin_cancelled'>".$info['cancelled_loan'] . " </td></tr>";
Print "</tr>";
}
Print "</table>";
?>
输出
loan id
位于数据库中,还有一个名为collected
的第二个表,其中包含每个loan id
的信息(基于相同loan id
的最少3行信息)
如何从查询中获取每个id
,单击它,获取当前id
并将其声明为值,以便我可以执行另一个查询,
select * from collected where loan id = "$loan_id clicked";
我搜索了javascript
和jquery
,但我无法使用post method
,这是最好的方法吗?