At 04/06/2002 08:58, Evgeny Chuykov wrote:
>Try something like this:
>SELECT USERS.Username,FILES.Filename
>FROM USERS LEFT JOIN FILES USING(Id)
>WHERE FILES.Filename IS NOT NULL ORDER BY FILES.Stamp DESC LIMIT 1;

I think it's wrong because Id isn't the matching column in 'FILES'.
2nd line should be 'FROM USERS LEFT JOIN FILES ON FILES.Userid = USER.Id'

And 'LIMIT 1' return 1 line not the first line for each USER.

I encounter such problem but I'm affraid that I didn't solve it :(


-- 
Hubert ADGIE
[EMAIL PROTECTED]
Tel : +33 5 53 88 00 76
Fax : +33 5 53 88 01 16


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to