Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > General
User Name
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!


  Search this Thread
Old 12-12-2001, 01:25 PM   #1
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
MYSQL advice needed.


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{filename} ). Now if "access.log" is in the 3rd column and I use an "update" command like this:

mysql > UPDATE table_name SET

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.
Old 12-12-2001, 01:48 PM   #2
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
Just concatenate them

UPDATE table_name
SET url = CONCAT('',filename);


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
advice needed bshearer *BSD 2 04-18-2005 01:19 PM
Advice needed (new user) starrider Linux - Newbie 3 02-08-2005 06:21 AM
Server Advice Needed tsk Linux - Hardware 3 11-08-2004 02:54 PM
advice needed ezra143 Linux - Laptop and Netbook 1 08-13-2003 03:44 PM
ColdFusion and MySQL - Advice Needed Zychior Linux - General 1 02-03-2002 10:59 PM > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 05:22 AM.

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