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 DEV-Group
 DEV Discussions (General)
 Retrieving signatures in post_info
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cripto9t
Average Member

USA
881 Posts

Posted - 11 April 2008 :  20:54:10  Show Profile  Reply with Quote
I noticed this earlier in another post.

This is the statement used to retrieve sigs
		if strSignatures = "1" and strDSignatures <> "1" then
			if Request.Form("sig") = "yes" and GetSig(strDBNTUserName) <> " " then
				txtMessage = txtMessage & vbNewline & vbNewline & ChkString(GetSig(strDBNTUserName), "signature" )
			end if
		end if

as you can see, if all conditions are right, it uses the GetSig function twice. Two trips to the db.
This will bring it down to one
if strSignatures = "1" and strDSignatures <> "1" then
			if Request.Form("sig") = "yes" then 
                                txtSig = GetSig(strDBNTUserName)
                                if trim(txtSig) <> "" then
				        txtMessage = txtMessage & vbNewline & vbNewline & ChkString(txtSig, "signature" )
                                end if
			end if
		end if


<

    _-/Cripto9t\-_

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 12 April 2008 :  02:17:53  Show Profile  Visit HuwR's Homepage  Reply with Quote
nice catch cripto9t<
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.07