以下查询语句可以从 MySQL 命令行执行我想要的操作,但我希望也可以在网页上获取结果。这是我为此写的,但我只收到错误 45。
table colspan="1" align="center" VALIGN="top" border="2" cellspacing = "0" cellpadding = "5">
<td>
<?php
$query = "SELECT concat(firstname, ' ', lastname) AS 'Online Users' FROM opensim.GridUser
INNER JOIN opensim.UserAccounts ON opensim.UserAccounts.PrincipalID = opensim.GridUser.UserID WHERE opensim.GridUser.online = 'true';
";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result));
echo $result ?>
<br><br><br>
When programed this page should show
<br>Grid Users Online Names <br>
<br><br></td>
</table>
任何帮助将不胜感激。