Solved

mySQL Query - Append Text to end of field

Posted on 2009-07-02
2
434 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unwanted output from my query 5 43
Database maintenance 36 111
database connection error mysql stops 7 35
Delete image(s) associated with record(s) 16 29
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

730 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