I'm not sure where to post this. But i have a photo album. In a table, it lists the members that have added a photo. The problem is that with several members this list is VERY slow, although the table looks very simple.
There is nothing different between those files with the exception of commented lines which have no effect. I visited the photo albums, looked at both samples' accounts and they worked properly (if a bit slowly).<
Your revision didn't work for several reasons. You cannot count using only a wild card when trying to extract data from multiple sources and you cannot compare a variable to a non-existent one. Also, you have no need to group by a secondary level of name (grouping by ID will already do that).
Try this line:
strsql = "SELECT a.MEMBER_ID, a.M_NAME, Count(b.I_ID), Max(b.I_DATE) FROM " & strMemberTablePrefix & "MEMBERS a, " & strTablePrefix & "IMAGES b WHERE a.MEMBER_ID = b.I_MID GROUP BY a.MEMBER_ID ORDER BY a.M_NAME ASC"
I see what is wrong. You cannot use imgcount or Ldate in the subscript range without specifying it earlier. Change the sql line to say:
strsql = "SELECT a.MEMBER_ID, a.M_NAME, Count(b.I_ID) AS imgCount, Max(b.I_DATE) AS imgLDate FROM " & strMemberTablePrefix & "MEMBERS a, " & strTablePrefix & "IMAGES b WHERE a.MEMBER_ID = b.I_MID GROUP BY a.MEMBER_ID ORDER BY a.M_NAME ASC"
The photoalbum mod retrieves all the members from the database then tries to work with that data. That's a whole lotta data if you got a big forum. It's a wonder I haven't seen other members complain about it.<
I suppose it's all in the purpose of a forum as to how much the photo album mod is actually used. His particular forum specializes in pictures of bugs. I think the photo gallery mod would better suit him, but maybe the changes to his script will improve things. It reduces the database calls by half.<
Yes the problem was the members list. And I have solved this to day (with help from friends). It has redused the database calls by much much more then half.
I love this mod (and snitz ) and we allready have more than 3400 pictures of all kinds of biological species, not only bugs .<