Solved

mySQL Query - Append Text to end of field

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

803 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