Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

mySQL Query - Append Text to end of field

Posted on 2009-07-02
2
Medium Priority
?
467 Views
Last Modified: 2012-08-14
Hey,
I want to update about 450 records by appending a string of text to the end of a field.

Basically; in table 'jos_jcalpro_events' where 'RTO' = '1' append "<a href='#'>Link</a> " to the bottom of the field called 'description'.

How would I go about structuring my SQL query to do this.

Thanks for any input

Regards
Mitch
0
Comment
Question by:SM17CH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 1000 total points
ID: 24769670
Hope this helps:

Not sure whether RTO field is of datatype integer or string.
If it is integer, then remove single quotes for 1.
UPDATE jos_jcalpro_events
SET description = CONCAT(description, '<a href='#'>Link</a>')
WHERE RTO = '1'

Open in new window

0
 
LVL 31

Assisted Solution

by:RiteshShah
RiteshShah earned 1000 total points
ID: 24770456
it seems there was a small mistake in above solution, have a look at this one.



UPDATE jos_jcalpro_events
SET description = CONCAT(description, '<a href=''#''>Link</a>')
WHERE RTO = '1'
 
 
--or
 
UPDATE jos_jcalpro_events
SET description = CONCAT(description, '<a href=''#''>Link</a>')
WHERE RTO = 1

Open in new window

0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we’ll look at how to deploy ProxySQL.
What we learned in Webroot's webinar on multi-vector protection.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question