我試圖用2個表中的數據創建一個循環,這個東西給了我一個錯誤,表示結果不止一行。這是腳本。來自兩個表的sql調用
$query_amoline = "SELECT * FROM `penny_players` WHERE `memid`=\"$curmemid\" AND id= (SELECT id FROM `penny` WHERE `active`='Y') ORDER BY `id` DESC";
$amoline = mysql_query($query_amoline) or die(mysql_error());
$row_amoline = mysql_fetch_assoc($amoline);
$totalRows_amoline = mysql_num_rows($amoline);
<? if($totalRows_amoline>0)
{ ?>
<?php do { ?>
<?php
$id=$row_amoline['id'];
$pid=$row_amoline['pennyid'];
if($totalRows_amoline>0)
{ ?>
}
你們是嚇壞geniusses –