How to get comment data from db without special characters and html tags in mysql

104 Views Asked by At

Comment sample data in database in column "comment"

  <p>
    Here is the sample content of the article.&nbsp;&nbsp; We hope you fix it!</p>
  <p>&nbsp;</p>

Input data

  Here is the sample content of the article.We hope you fix it!

Input data is passed in query and query will check if input string is already in database or not.

e.g

Select count(id) as total from tbl where comment='Here is the sample content of the article.We hope you fix it!';

Result will be like

total 1
0

There are 0 best solutions below