3 つの mysql ストアド プロシージャを呼び出す必要がある PHP スクリプトがあります。しかし、何らかの理由で、最初に呼び出したものだけが表示されます。これはコードです:
$raceid = $_GET['raceId'];
$race = "CALL GetRace($raceid)";
if ($stmt = $con->prepare($race))
{
$stmt->execute();
$stmt->bind_result($results);
while ($stmt->fetch())
{
echo $results;
}
$stmt->close();
}
$fastround = "CALL GetFastestRound($raceid)";
if ($stmt = $con->prepare($fastround))
{
$stmt->execute();
$stmt->bind_result($results);
while ($stmt->fetch())
{
echo $results;
}
$stmt->close();
}
$uitslag = "CALL GetUitslagByRaceID($raceid)";
if ($stmt = $con->prepare($uitslag))
{
$stmt->execute();
$stmt->bind_result($results);
while ($stmt->fetch())
{
echo $results
}
$stmt->close();
}
この場合、$race の結果のみが表示されます。しかし、たとえば $fastround コードを $race コードの上に置く (または単に $race コードを削除する) と、$fastround の結果が表示されます。
Windows マシンで WAMP を使用してコードを作成しましたが、それを実稼働環境用の Linux 環境に移動したいと考えていました。もう1つの奇妙なことは、WAMPで完全に機能したことです.
ここで何が間違っていますか?