MYSQL advice needed.
Hi,
I have an inventory of all server documentation. I am trying to make it dynamically intranet web readable by creating a MYSQL database (This is my first venture into MYSQL'ing) and then I will learn PHP and use it to parse my database into a dynamic webpage. My current problem is that I have about 8,000 rows with the following columns: filesize modified date filename url Currently I have the first 3 columns filled in via a text file I loaded into the database. I want to define the url column by giving some text that will be the same throughout (the actual URL path) AND the filename from column 3 to complete the URL statement. (i.e., filename is "access.log" and the URL path is http://myserver.domain.com/{filename} ). Now if "access.log" is in the 3rd column and I use an "update" command like this: mysql > UPDATE table_name SET url=http:myserver.domain.com/? how do I tell it to take the value of column 3 and insert it into the path statement? Hope this makes sense. Thanks for any and all suggestions. |
Just concatenate them
UPDATE table_name SET url = CONCAT('http:myserver.domain.com/',filename); |
All times are GMT -5. The time now is 05:08 PM. |