Forum OpenACS Q&A: Response to Outer join Query for Users_files: Help

Posted by Bob OConnor on

Thanks Todd, that's what I needed:

case when exists 
    (select 1 from users_files uf 
      where uf.owner_id = u.user_id 
        and uf.file_size > 0)
         then '*'
         else ' '
         end as file_owner

For those lurking, I added the
uf.file_size > 0
so that it would only star for users with files. This code was added to the select in /homepage/all.tcl

And Thanks Dan, I did notice that this is slower to show so it will be great when it's optimized.