Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Elif
Newbie


Joined: 18 Aug 2004
Posts: 2

PostPosted: Sun Apr 17, 2005 8:13 pm   

mapquert
 
i have an alias like this.
#mapquery {"[Name] LIKE '%@roomname%'"}

if rooname is gates of soros it works
but when its gate's of soros dont work. do you know why?
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Sun Apr 17, 2005 11:32 pm   
 
I believe you have to escape that single quote , and I think you do this in an sql statement by doubling the single quotes. (far from a guru with sql)

try this when you call it instead (might want to write an alias)
#mapquery {[Name] LIKE '%%replace(@roomname,"'","''")%'}


maybe someone else knows an easier way
_________________
I love deadlines. I like the whooshing sound they make as they fly by.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Apr 17, 2005 11:35 pm   
 
Either the % symbols are interfering (not likely, that's part of SQL syntax, right?) or the single quote is. To fix the latter, you probably will have to use some kind of bracketing/quoting or maybe just remove it from the name altogether.

I have no idea if it'd work, but you might also try fooling around with %expand().
_________________
EDIT: I didn't like my old signature
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Mon Apr 18, 2005 2:01 am   
 
Quote:
#mapquery {[Name] LIKE '%%replace(@roomname,"'","''")%'}

Actually wont work due to the %%

#mapquery {[Name] LIKE '%char(37)%replace(@roomname,"'","''")%'}

Alternativly you could use an ugly concat statement but this works :p
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Elif
Newbie


Joined: 18 Aug 2004
Posts: 2

PostPosted: Mon Apr 18, 2005 4:32 pm   
 
its worked thanks a lot
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net