Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Retrieving signatures in post_info

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
cripto9t Posted - 11 April 2008 : 20:54:10
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


<
1   L A T E S T    R E P L I E S    (Newest First)
HuwR Posted - 12 April 2008 : 02:17:53
nice catch cripto9t<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07