Skip to content

Instantly share code, notes, and snippets.

@ginatrapani
Created September 21, 2010 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ginatrapani/590828 to your computer and use it in GitHub Desktop.
Save ginatrapani/590828 to your computer and use it in GitHub Desktop.
CREATE TABLE tu_posts_tmp ( post_id bigint(11) NOT NULL );
INSERT INTO tu_posts_tmp
SELECT p.post_id FROM tu_posts p
INNER JOIN tu_posts p1 ON p.in_reply_to_post_id = p1.post_id
WHERE p.network = 'facebook' AND p1.network='facebook page';
UPDATE tu_posts, tu_posts_tmp
SET network = 'facebook page'
WHERE tu_posts.post_id = tu_posts_tmp.post_id;
DROP TABLE tu_posts_tmp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment