mysql - Sql query for like operator -


I have a search box where the user enters and submits anything in the text box. Indicate that the user enters Peter. If we are comparing in SQL, with the following query the table

  select * from XML where the name '% peter%'  

this question is well Works, but when I only want to search for Peter in the string, then it creates a problem. When I want to find only those rows that exist in the column called Peter column. Name in column, value 1- My name is Peter Valu2- My name is Petreter Valu3- My name is staying in America Peter. When I want to find it should be given only the first and the third line. Not at the second number. To get three lines with the above question. How can I correct it? Please guide it on

"name

  with code * / div>  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -