Solved

mySQL Query - Append Text to end of field

Posted on 2009-07-02
2
397 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
2 Comments
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 250 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 250 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
postgres queries -- need opinions 1 36
Selecting specific rows 3 34
Problem to go to Web page 2 50
report returning null 21 50
Read about achieving the basic levels of HRIS security in the workplace.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now