This is a discussion on MySql gurus within the Coding Help forums, part of the Webmaster Help category; Ok all mysql gurus, I need help here. I have a table with few fields: f_1, f_2, f_3, f_4 I ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||||
| Ok all mysql gurus, I need help here. I have a table with few fields: f_1, f_2, f_3, f_4 I want to run a query in mysql to get all the fields together and update the result into f_1 Update `table` set `f_1`=`f_1`. " ".`f_2`." ".`f_3`." ". `f_4` is this possible directly on the server using Navicat?
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Directory Submission Directory Submission :. News & Press Release Ireland GiveItSocks.com :. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories :. I Have 2 Find It Directory SEF Directory |
| |||||
| Quote:
MySQL AB :: MySQL 5.0 Reference Manual :: 13.2.7 SELECT Syntax Regards...jmcc |
| |||||
| I was looking at that but it only does it on SELECT statement. I love to do it directly to the database table instead runing the code in PHP, just in case I get an error and everything goes busted. php will do if I can not run it on the table itself |
| |||||
| Quote:
I'm not sure if the UPDATE t1 SET f1=CONCAT(f1,f2,f3,f4) would work cleanly. It might be best to test it on a local setup first before deploying it using php. Backup the tables first though. Regards...jmcc |
| |||||
| I will try that after dinner or in the morning. Never thought of creating a new table. The table is duplicate of the original, so i could play with it alright. I also have an xml and xsl copy just in case. |
| |||||
| Thanks man. It worked on the server using Navicat: Code: UPDATE `tbl_products` SET `product_name`= CONCAT(`product_name`, ' ', `product_desc`, ' - ', `code_no`, ' ', `group`) |
| Tags |
| gurus, mysql |
| Thread Tools | |
| Display Modes | |
|
|
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| calender script (php, mysql) | 7aken | Coding Help | 3 | 20-10-2006 06:57 AM |
| php, mysql & .asp from same laptop | alex | Server / Technical Administration Tips and Queries | 11 | 16-10-2006 06:01 PM |
| What MySQL front end GUI do you use (windows) | louie | Webmaster Discussion | 3 | 02-10-2006 01:06 PM |