I am creating search in html5 using local db.
Can any buddy help me to figure out this problem.
query = "SELECT * FROM exhibitors where exhibitor ?;";
How can i using the like condition with "?".
I try following way but not working.
function searchData()
{
var src=document.getElementById('searchId');
query = "SELECT * FROM exhibitors where exhibitor LIKE %?;";
try {
localDB.transaction(function(transaction){
transaction.executeSql(query, [src.value,src.value,src.value,src.value,src.value], function(transaction, results){
var row = results.rows.item(0);
updateExhibitorForm(row['id'], row['exhibitor'], row['logo'], row['contactPerson'], row['designation'], row['address'], row['website'], row['phone'],row['email'], row['profile'], row['standNo'], row['fax']);
queryAndUpdateSearch(src.value);
}, function(transaction, error){
updateStatus("Error: " + error.code + "<br>Message: " + error.message);
});
});
}
catch (e) {
updateStatus("Error: Unable to select data from the db " + e + ".");
}
}