LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


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

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

Rep: Reputation: 30
Just concatenate them

UPDATE table_name
SET url = CONCAT('http:myserver.domain.com/',filename);
 
  


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

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 08:37 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