You may try this and see if it works (didn't test it, just jotted it down here):
select t1.textid, t1.textid, t1.textvalue from texts as t1, texts as t2 where (t1.languageid='$Primlanguage' and t1.textid=t2.textid) or (t1.textid=t2.textid and t2.languageid='$Seclanguage' and t2.languageid!='$Primlanguage') Hope this helps! Bogdan > What i really want the query to do, is to return a row where Primlanguage = > languageid and only to return a row where Seclanguage = languageid if there > has not been returned any other rows with the same textkey. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php