|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Fri Jun 06, 2008 3:22 am
[2.26] %mapquery |
Why isnt this showing anything?
Code: |
#VAR QuestDB {Room=Paul's Chambers}
#SHOW %mapquery("[Name] like '%replace( %db( @QuestDB, Room), "'", "''")%'")
|
If I do
Code: |
#SHOW %mapquery("[Name] like 'Paul''s Chambers%'")
|
I get the correct vnum. |
|
|
|
alluran Adept
Joined: 14 Sep 2005 Posts: 223 Location: Sydney, Australia
|
Posted: Fri Jun 06, 2008 3:29 am |
Code: |
#SHOW %mapquery("[Name] like '"%replace( %db( @QuestDB, Room), "'", "''")"%'")
|
|
|
_________________ The Drake Forestseer |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Jun 06, 2008 4:22 am |
Alluran is correct. For those that keep staring at it to figure out the cause, the original script had the %replace function within " quotes, and in CMUD, nothing is evaluated within quotes. In Alluran's example, the %replace is outside the quotes and he is using implicit concat to add the result to the literal string in the quotes.
|
|
|
|
|
|