|
ToyMage Apprentice
Joined: 01 Sep 2005 Posts: 120
|
Posted: Thu Oct 13, 2005 6:07 am
HELP DEBUG |
This is one of my alias, "QF"
#MAPQUERY {[Name] LIKE ~'%@QuestRoom%~'}
Basically i have the QuestRoom captured by a trigger. So when I type QF, it is supposed to find the room(s) and list it in database view.
BUT I have this problem... when the room name has "'" for example "Toy Mage's Home", the #MAPQUERY fails and saying error in expression and the data list is empty. Any other room names without "'" works perfectly.
How should I enclose the @QuestRoom Variable to search correctly?
Toy Mage |
|
|
|
OmegaDeus Apprentice
Joined: 14 Sep 2005 Posts: 121
|
Posted: Thu Oct 13, 2005 7:13 am |
If mapquery is anything like real sql you may be able to enclose the variable in regular quotation marks instead of single quotes, if that don't work, maybe replace the ' in the name or remove it completely?
|
|
_________________
Look at me I've got zSKILLS |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Thu Oct 13, 2005 10:27 pm |
A simple search of the forums would have revealed the answer. This is out of my memory banks but I think its correct.
#MAPQUERY {[Name] LIKE ~'%char(37)%replace(@QuestRoom,"'","''")%~'} |
|
|
|
|
|