Roshan
Roshan

Reputation: 59

Using preg_replace in mysql

I have a CMS content in database. The content contains '<img src= .............../>' also. I want to retrieve this content using mysql query and show on frontend but with all '<img src='.........../>' removed from the content.

How can it be done using query in mysql?

Upvotes: 0

Views: 1456

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799230

Once you install lib_mysqludf_preg you'll be able to use various regex functions in MySQL. See the docs on that page to find out more about them.

DISCLAIMER: I have not used this package and will not guarantee that it won't do anything to the server.

Upvotes: 1

Related Questions