I've the following code to select a row.. When I call the function with getRecords("Peter Sam"); one record is shown.. However if I just pass getRecords("Peter"); it says "No results".
getRecords = function(cname){
db.transaction(function(tx) {
tx.executeSql('SELECT * FROM contacts WHERE (cname LIKE ?)', [cname], renderResults);
});
}
What is the correct usage of "LIKE" in "Select" query?? BTW where do I refer SQL syntax for WebSQL?
Thanks