Avatar of HelpNearMe
HelpNearMe
Flag for Afghanistan asked on

Need help with SQL Query

Hi Experts,

In the jos_content table column introtext, I would like to replace any occurance of this:

<a target="_blank" href="index

with:
<a target="_self" href="index

Can someone show me how this query would be formed? (MySQL 5.0.32) & myPHPAdmin

thanks!

HNM
MySQL ServerDatabases

Avatar of undefined
Last Comment
HelpNearMe

8/22/2022 - Mon
akitsupport

update jobs_content
SET  = jobs_content.Fieldname = <a target="_self" href="index
where jobs_content.Fieldname = <a target="_blank" href="index

Should work though I don't know the fieldname you are trying to change hence my comment of Fieldname

I would try it on a single record first just to be sure or make a copy of the table and try it out as I don't know how your system looks and such.
SOLUTION
kpmartin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
HelpNearMe

ASKER
kpmartin: Really?  that will update the DB too?  Or just new articles?  Thanks!
kpmartin

Yes it will update the db.  Menu links have that setting in the lower left side.
kevin
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
HelpNearMe

ASKER
wow thats excellent I'll give it a try

thanks
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
HelpNearMe

ASKER
Thanks the query from theGhost_k8 worked great