Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 save percentage deleted posts/user
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 17 May 2006 :  05:08:35  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
I solved this by splitting the sql-string like this:

if intTotalMemberPosts > 0 then
set rscount1=my_conn.execute("SELECT COUNT(*) AS inttcount FROM "&strTablePrefix&"TOPICS WHERE T_AUTHOR="&ppMember_ID&"")
set rscount2=my_conn.execute("SELECT COUNT(*) AS intrcount FROM "&strTablePrefix&"REPLY WHERE R_AUTHOR="&ppMember_ID&"")
intpcount=clng(rscount1("inttcount"))+clng(rscount2("intrcount"))
rscount1.close
rscount2.close

set rscount1=nothing
set rscount2=nothing
intdpercentage=abs(round(((intTotalMemberPosts-intpcount)/intTotalMemberPosts)*100))

Is there any reason I can't do it like this?
I get a number and it might be correct.. I can't really tell =)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 17 May 2006 :  05:14:53  Show Profile  Reply with Quote
Nope, no reason at all; it does the same thing. Curious as to why the nested query didn't work, though, maybe that version of MySQL just doesn't support them - can you response.write it and post it here 'til we double check?

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 17 May 2006 :  05:47:20  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
What do you want response write:d? =)
The splitted string or the first string?
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 17 May 2006 :  05:49:06  Show Profile  Reply with Quote
My original, nested query.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 17 May 2006 :  06:49:48  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
I can't do a response.write since I get an error on the sql-string before the response.write is done.. Or can I do it in another way?
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07