Tuesday, July 23, 2013

How to search a wordpress database for shortcodes

MySQL can regex sweetness!

here is how to search wordpress posts for shortcodes today we are searching for the shortcode

[auction startbid:250] or [auction startbid:100] etc so we can use regex to find all the shortcodes with various amounts.

select * from wp_posts where
post_content   REGEXP  '\[auction startbid:[0-9]+\]'


Stumble Upon CodePyro

4 comments:

Anonymous said...

Encrusted along with 533 amazing reduce rolex replica diamonds with eye associated with two rolex replica emeralds, the actual cat sleeping along with the actual rolex replica sale can make this particular replica watches one of the most bold high jewelry wrist replica watches for girls. The actual 9981 rolex replica motion beneath the stunning replica watches sale is really exactly the same 1 replica watches uk in the actual.

wppostschedulerit said...

Your contents are completely awesome and share worthy. I really appreciate your efforts that you put on this. Keep sharing. For more Scheduling Wordpress Posts related information visit Wp Post Scheduler (by Design & Servizi)

Alia parker said...
This comment has been removed by the author.
Alia parker said...

This is my first visit to your internet journal! We are a team of volunteers as well as new tasks in the same specialized. Site provided us helpful data to work. Typeform alternative

Post a Comment