Author |
Topic  |
@tomic
Senior Member
   
USA
1790 Posts |
Posted - 03 October 2002 : 18:46:23
|
Ok, great. It also was only doing a count on PM_TO so I will look at counting the other necessary fields for a more total total.
@tomic |
SportsBettingAcumen.com |
 |
|
@tomic
Senior Member
   
USA
1790 Posts |
Posted - 03 October 2002 : 19:42:02
|
I now have a way of getting the actual PM total rather than just the total sent but I was wondering if any of you SQL gurus know a good way of joining these together:
' Get Private Message Total for display
if strDBType = "access" then
strSqL = "SELECT count(M_TO) as [pmtotal1] "
else
strSqL = "SELECT count(M_TO) as pmtotal1 "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "PM P"
strSql = strSql & " WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_TO"
Set rsPM = my_Conn.Execute(strSql)
pmtotal1 = rsPM("pmtotal1")
rsPM.close
set rsPM = nothing
' Get Private Message Total for display
if strDBType = "access" then
strSqL = "SELECT count(M_FROM) as [pmtotal2] "
else
strSqL = "SELECT count(M_FROM) as pmtotal2 "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "PM P"
strSql = strSql & " WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_FROM"
Set rsPM = my_Conn.Execute(strSql)
pmtotal2 = rsPM("pmtotal2")
rsPM.close
set rsPM = nothing
pmtotal = pmtotal1 + pmtotal2
Response.Write pmtotal
Can I do it like:
"SELECT
pmtotal1=(SELECT Count(M_TO) FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "PM P WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_TO"),
pmtotal2=(SELECT Count(M_FROM) FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "PM P WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_FROM")"
I dread having two queries for something so basic.
@tomic
|
SportsBettingAcumen.com |
Edited by - @tomic on 03 October 2002 19:43:21 |
 |
|
@tomic
Senior Member
   
USA
1790 Posts |
Posted - 03 October 2002 : 19:53:19
|
OK nevermind it works. I just need to check it on Access but I have absolutely no clue what will happen with mySQL.
@tomic |
SportsBettingAcumen.com |
 |
|
MichaelA
Junior Member
 
USA
222 Posts |
Posted - 03 October 2002 : 19:59:24
|
Are you updating the file name so we can keep track of changes being made and when it is time download a new file?
Can the link at the very beginning of this message be used to get the latest version?
Thanks.
Mike
|
 |
|
@tomic
Senior Member
   
USA
1790 Posts |
Posted - 03 October 2002 : 20:10:18
|
Yes, the zip file(s) will have the most current version and I list what files have been updated and what for in the first post in this topic. I have not made an changes to the zip for over 8 hours now and these last few posts of mine regarding the PMLimit are NOT in the zip yet until further testing has been done. It works great in an SQL 2000 database but the verdict is still out on Access and mySQL.
@tomic |
SportsBettingAcumen.com |
Edited by - @tomic on 03 October 2002 20:12:26 |
 |
|
burthold
Junior Member
 
USA
426 Posts |
Posted - 04 October 2002 : 01:04:39
|
Well I am running MySQL here if you need any support.
Wes |
 |
|
MichaelA
Junior Member
 
USA
222 Posts |
Posted - 04 October 2002 : 04:19:36
|
Thank you.
You have to stop making such popular MODs. You are going to beat records for Snitz 3.4.00, 01, 02, and 03 on the number of pages for a topic! 
I'm downloading it now to put over what is already in place. Will definitely read the text files. Keep up the good work with the MOD, especially the excellent support.
Mike
I see what you mean by updating the information about what changes are made. It is done on the link page. Excellent. I don't go back to the beginning of a 13 page topic very often but I will check more often know that I understand what you are doing.
Thanks.
|
Edited by - MichaelA on 04 October 2002 04:24:52 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 04 October 2002 : 05:32:54
|
@tomic, could you please start a new thread for this, 13 pages of posts can be very confusing for newcomers. |
 |
|
gareth_moore_2000
Junior Member
 
United Kingdom
262 Posts |
Posted - 04 October 2002 : 07:44:38
|
quote: Originally posted by @tomic
Hmmmm, I think I see what's up. I added that query to inc_header.asp that displays the total "new" PMs and that was selected as pmcount which is what's used to block the links to send or forward or reply. So now I am adding a query to the necessary pages which will get the total of all PMs. New PMs will usually be a much, much smaller number than the total. There was another irregularity with the warning text if the limit is surpassed. That is now fixed as well. It's not updated in the zip yet until I check out the results.
@tomic
So are you suggesting that if we dont make any changes to inc_header.asp as was suggested in the readme file, then the PM Limit feature should work fine ? I tested this out, and I replaced my inc_header.asp with a fresh unedited copy of inc_header.asp and still the same, I set the PM Limit as low as 3- and still you could have unlimited amount of PM's in your inbox ! |
 |
|
gareth_moore_2000
Junior Member
 
United Kingdom
262 Posts |
Posted - 04 October 2002 : 07:48:31
|
MMMmmm... the plot thinkens !
After I replaced the new file and re-uploaded my inc_header.asp back- I suddenly got that elimit message ! (using the edited inc_header.asp) ! This was when all the PM's were unread. But then after I read all the new PM's the limit message went and I was able to send again without clearing any of the PM's ! |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 04 October 2002 : 10:03:32
|
quote: Originally posted by HuwR
@tomic, could you please start a new thread for this, 13 pages of posts can be very confusing for newcomers.
gareth_moore_2000, the request was not aimed specifically at @tomic, but was a general request for you to post your questions in a different thread, I left it open out of curtesy so that @tomic could respond before I locked it. |
 |
|
Topic  |
|