@Bernd: The query is completly wrong for this case. You would have to check, if the user has posted in the gallery-forum and had uploaded there an attachment. So, something like (just an example, no reals SQL-Instruction):
If attachment.userid=post.userid and attachment.gallery="1" then...
I can have a look at this, as this is something, i wanted to release, either.
|