我有问题让这个工作。我也尝试过彼此内部的查询,但它不起作用。有人知道为什么吗?
$ligan = mysql_query("SELECT leagueId FROM league WHERE leagueName='$leagueName'");
$laget = mysql_query("SELECT teamid FROM team WHERE leagueId='$ligan'");
$result = mysql_query("SELECT * FROM player WHERE teamId='laget'");
这是打印的地方...
<?php
if(mysql_num_rows($result) == 0){
echo $result;
}
else{
while($row = mysql_fetch_array($result)){
echo "<tr>";
echo "<td>" . $row['playerName'] . "</td>";
echo "<td>" . $row['birthday'] . "</td>";
echo "<td>" . $row['weight'] . "</td>";
echo "<td>" . $row['height'] . "</td>";
echo "<td>" . $row['madeGoals'] . "</td>";
echo "</tr>";
}
}
mysql_close($db); ?>
我遇到了这个问题:mysql_num_rows() 期望参数 1 是资源,布尔值在
我相信 ligan 提供一个价值,而 laget 提供很多。
你能帮我吗?