对于PHP / SQL,我是一个初学者/可怕的人,记住这一点。好吧,所以我要做的就是打印一些“值”或用PHP / SQL调用它们的任何东西,如下所示:
<?PHP
require_once
?>
现在这很好用。
答案 0 :(得分:0)
只需添加它们就像添加剩余的选择列一样。
require_once("dbb.php");
$SQL="select
date_format(timestamp,'%Y %M %d') as datum,
arena.namn as arena,
concat(hemma.lagnamn,'-',borta.lagnamn)as lag,
(select count(*) from mål where matchID=matchID and hemma.lagID=hemma) as h,
(select count(*) from mål where matchID=matchID and borta.lagID=borta)as b,
publiksiffror,
hemmagoal,
bortagoal
from
matcher
inner join
lag as hemma
on hemma.lagID = hemma
inner join
lag as borta
on borta.lagID = borta
inner join
arena
on matcher.arena=arena.arenaID;";
$result = mysql_query($SQL) or die(mysql_error());
while($rad = mysql_fetch_row($result))
{
echo "<tr>";
echo "<td>" . $rad[0] . "</td>";
echo "<td>" . $rad[2] . "</td>";
echo "<td>" . $rad[3] . "</td>";
echo "<td>" . $rad[4] . "</td>";
echo "<td>" . $rad[1] . "</td>";
echo "<td>" . $rad[5] . "</td>";
echo "</tr>";
}
?>