Title: sql script not working
Last modified: August 19, 2016

---

# sql script not working

 *  [TVining](https://wordpress.org/support/users/tvining/)
 * (@tvining)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/sql-script-not-working/)
 * I used to use the following sql command to take all the words beyond “release.”
   and before the words “Has graduated” and put them in the title.
 * I would normally end up with something like “Marine Corps Private June J. Jett”
 * `UPDATE wp_posts SET post_title=(SELECT substr(post_content, LOCATE('ase.\n',
   post_content)+7,LOCATE('has Graduated',post_content)-LOCATE('ase.\n',post_content)-
   8)) where post_content like '%has graduated%' and post_title like '%hometown%';`
 * However, since upgrading to 2.7, I now get “-Mime Type of File is image/jpeg –
   ><div class=”po” It’s like it’s not finding the word release.
 * But why would it start at the version change?
 * TIger

The topic ‘sql script not working’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 0 replies
 * 1 participant
 * Last reply from: [TVining](https://wordpress.org/support/users/tvining/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/sql-script-not-working/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
