How to check a \n character in mysql using php -
i having address
"1500 bustleton pike churchville, southampton, pa 18966, united states" and present in database. when used in query
select id companies companyaddress '1500 bustleton pike churchville, southampton, pa 18966, united states' it not returning value. because contain new line after "churchville,". please me solve this
there 2 potential problems:
most issue it's \n (lf) and/or \r\n (crlf) check.
second there or not spaces around line break
if you're not sure, check out replace() function: find out if search \n or \r\n , match in following:
select id companies replace(companyaddress, '\n', '\r\n') = '1500 bustleton pike churchville, southampton, pa 18966, united states' where second parameter in replace 1 have in source code. check spaces in query match (or remove spaces replace).
i suggest ensuring string entered in standard form future searching around problem.
note: don't on large file search won't indexed.
Comments
Post a Comment