This is the query:
$result = mysql_query("SELECT a.nickname FROM users a, additional_info b
WHERE a.id=b.uid order by a.id DESC limit 0, 20") or die('Error');
while ($i = mysql_fetch_array($result))
{
echo $i['nickname'];
}
Table additional_info contains 2 rows where a.id=b.uid.
So, I get dublicate results:
nick1
nick1
nick2
nick2
nick3
nick3
etc...
Is there any way how avoid dublicate results?
P.S. Yes, I know, I can use JOIN, but first of all I have to resolve this problem.