some of the simplest things in code are the hardest for me... I've done this before but I can't remember how.
I have a mysql loop that fetches information from a table based on the username and then a loop inside of that one that fetches matches to the results based on an entry id... the problem is that the matching results are duplicated under under every match in the loop... please help?
Code: Select all
$queryb = "SELECT * FROM database.field WHERE author = '".$user."' ORDER BY time DESC LIMIT 8";
$query_resultb = @mysql_query ($queryb) OR error(mysql_error(), __LINE__, __FILE__, 0, '', '');
while($infob = @mysql_fetch_array($query_resultb)) {
$eid = $infob['eid'];
$entry = info[*];
heres the matches... then I have another loop
$queryc = "SELECT * FROM database.comments WHERE id='".$eid."' ORDER BY time DESC LIMIT 2";
$query_resultc = @mysql_query ($queryc) OR error(mysql_error(), __LINE__, __FILE__, 0, '', '');
while($infoc = @mysql_fetch_array($query_resultc)) {
matches found here repeat for every $entry match above on the page inside the loop??
}
}