LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-14-2008, 04:54 AM   #1
h725
Member
 
Registered: Apr 2008
Posts: 114

Rep: Reputation: 15
Update several field in MySQL


Hi,

I've a mysql table with different field, one of these contains a unix path (/usr/home/username).
I must add a string to path (for lot of users) to obtain this:

/usr/home/username/www/

I was thinking about a bash script.. but there is something better ?
Maybe with the mysql "concat" function?

Thanks in advance
 
Old 09-14-2008, 05:08 AM   #2
h725
Member
 
Registered: Apr 2008
Posts: 114

Original Poster
Rep: Reputation: 15
Sorry, solution was really easy..

update `table` set `field` = concat(`field`,'string');
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[PHP] [mySQL] Finding all records with with a certain field. s0l1dsnak3123 Programming 2 06-15-2008 08:26 PM
php mass update database field value frieza Programming 3 04-02-2008 05:50 PM
set mysql default value to value of other field kpachopoulos Programming 1 10-11-2007 09:04 PM
caps sensitivity in mysql table/field name Swakoo Linux - General 0 11-14-2005 01:16 AM
storing multiple values within one field in mysql antken Programming 8 12-15-2002 10:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration