[SOLVED] Synax wrong on WHILE construction?

Using
$uid = {emails} → fields[1];
the field is empty.

What is wrong?

sc_lookup(emails, "
SELECT freund_lfn, eigene_uid
  FROM endkundenwerbung
 WHERE wurde_teilnehmer = 'J'
   AND leitungsfunktion_j_n = 'J'
   AND (bezeichnung_leitungsfunktion IS NOT NULL OR bezeichnung_leitungsfunktion <> ' ')
   AND (leitung_in_firma IS NOT NULL OR leitung_in_firma <> ' ')
", "conn_mysql");
if ({emails} === false)
{
exit;
}
else
{
while (!{emails}->EOF)
	{
	$lfn = {emails} -> fields[0];
	$uid = {emails} -> fields[1];
		echo 'UID: ' . $uid;
		exit;
	teilnehmerkonten($lfn, $uid);

	{emails}->MoveNext();
	}
	{emails}->Close();

There is no condition around your second exit, it will always execute

Also you are missing a brace at the end to close the if

Thanks for the answer!
I found out that it has not to be a sc_lookup.

It has to be like this and than it works:

sc_set_fetchmode(1); 
sc_select(emails, "
SELECT freund_lfn, eigene_uid