hostData not allowing me to pass a parameter with quote mark

2 posts / 0 new
Last post
daybook63
hostData not allowing me to pass a parameter with quote mark

Hello to all,

function getInfo(mpn,padd){

var sdata = 'key=KEY';

sdata = sdata + '&maxMatches=2&ambiguities=ignore&hostedData=mqap.ntpois|name LIKE ?|'+mpn+'|name,address,city,phone&origin='+padd;

$.ajax({

 

dataType: 'json',

url: 'http://www.mapquestapi.com/search/v2/search',

data: sdata,

success: function (data, status, xhr) {

// update command is executed.

var sr = data.searchResults;

mpp = sr[0].fields.phone;

mpp = mpp.substring(4);

console.log(mpp);

},

error: function () {

   // cancel changes.

 

}

});

}

 

Passing the name like Wendy's does not provide a result. How do I prepare SQL with special characters?


MQBrianCoakley
This is a known issue in
This is a known issue in search/v2 so we recommend using search/v4 which is where new development is still taking place and data is still being updated.