sql - pulling data value that has apostrophe but your input does not? -


i have table column name title data has apostrophe in it.
query input parameter removes apostrophe it, how compare or equal row back?

select * authors..atricles title = 'buyers' buyer's = 'buyers' or '%buyers%' 

if user inputs buyer's on page remove ' , new input string buyers.

to escape it, add single quote:

where title '%buyer''s%' 

since mention query input parameter removes apostrophes, search using replace:

where replace(title, '''', '') = 'buyers' 

using functions in fashion make possible indexes useless.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -