Im trying to select a value from a table using Select As, so that I can then use that value in a find & replace statement. This is what I have so far, but no luck:
SELECT meta_value from wp_postmeta where meta_key=description and post_id IN (22179,22182) AS “video”, update wp_posts set post_content = replace(post_content,”[description]”,”video”)
Any suggestions?
Thank you.
ASis for renaming columns that youSELECT, so it would look like this:which isn’t what you want. You’re after
SELECT INTO, e.g.And then you can use @my_var later.
See the manual.