CODE Tags and Mentioning

Joined
Aug 14, 2009
Messages
2,309
Reaction score
1,208
In my opinion this shouldn't happen:

Code:
-- update session key/id
	declare   [USER=2000045131]Session[/USER]Key varchar(50) = NEWID()
	declare   [USER=2000045131]Session[/USER]ID int = checksum   [USER=2000045131]Session[/USER]Key)
	if exists (SELECT CustomerID FROM LoginSessions WHERE CustomerID =   [USER=25895]Custom[/USER]erID)
	begin
		UPDATE LoginSessions SET 
			SessionKey   [USER=2000045131]Session[/USER]Key, 
			SessionID   [USER=2000045131]Session[/USER]ID,
			LoginIP=@in_IP, 
			TimeLogged=GETDATE(), 
			TimeUpdated=GETDATE()
		WHERE CustomerID   [USER=25895]Custom[/USER]erID
	end
	else
	begin
		INSERT INTO LoginSessions
			(CustomerID, SessionKey, SessionID, LoginIP, TimeLogged, TimeUpdated)
		VALUES 
			   [USER=25895]Custom[/USER]erID,   [USER=2000045131]Session[/USER]Key,   [USER=2000045131]Session[/USER]ID, @in_IP, GETDATE(), GETDATE())
	end

It just mentions people what actually code is.
 
@GigaToni ChewBecca MentaL

Work around. (Solution to get around this issue)
Put the @ Symbol itself in Bold Block.

Here is bolded:
Code:
-- update session key/id
	declare   [B]@[/B]SessionKey varchar(50) = NEWID()
	declare   [B]@[/B]SessionID int = checksum   [B]@[/B]SessionKey)
	if exists (SELECT CustomerID FROM LoginSessions WHERE CustomerID =   [B]@[/B]CustomerID)
	begin
		UPDATE LoginSessions SET 
			SessionKey   [B]@[/B]SessionKey, 
			SessionID   [B]@[/B]SessionID,
			LoginIP=@in_IP, 
			TimeLogged=GETDATE(), 
			TimeUpdated=GETDATE()
		WHERE CustomerID   [B]@[/B]CustomerID
	end
	else
	begin
		INSERT INTO LoginSessions
			(CustomerID, SessionKey, SessionID, LoginIP, TimeLogged, TimeUpdated)
		VALUES 
			  [B]@[/B]CustomerID,   [B]@[/B]SessionKey,  [B]@[/B]SessionID, @in_IP, GETDATE(), GETDATE())
	end
 
Last edited:
I don't have access to fixing that, nor do I believe the forum has that option.
At least there is a way around it. :D:



Generally only happens with code.
You generally are copying the code from source to the posted code block.
Takes 1 minute to paste it into notepad++
Search-Replace all instances of @ symbol with [ B]@[/B ] same with # symbol.
Copy / paste into post.
 
Back