I trying to create a loop with data from 2 tables, this thing is giving me an error that says, results more than one row. Here’s the script.
$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)
{ ?>
}
if
returns more then one id, your query will fail.
Change to: