Soldato
- Joined
- 22 Aug 2005
- Posts
- 8,968
- Location
- Clydebank
Hi all
Doing some my sql was trying to join some data from one table in to
another and realised I think I've made a bit of a mistake - what should I do -
or what should I have done....
If you look at the php out put I want the 'friendly name' to be listed instead
of the mount point. But I can't see a way to get the frinedly name for
input AND output as well?
table locations:
table jobqueue
output on web page
out put with 'freindly name'
and the code that produced that:
edit i could actually just store the friendly name along with the moutn point in the job queue table. That would probably work for now.
Doing some my sql was trying to join some data from one table in to
another and realised I think I've made a bit of a mistake - what should I do -
or what should I have done....
If you look at the php out put I want the 'friendly name' to be listed instead
of the mount point. But I can't see a way to get the frinedly name for
input AND output as well?
table locations:

table jobqueue

output on web page

out put with 'freindly name'

and the code that produced that:
Code:
SELECT `jobname` AS `Job Name` , `sourceroot` , `sourcepath` AS `Source Location` , `destroot` AS `Output Drive` , `destpath` AS `Destination` , `batchstart` AS `Start` , `batchend` AS `End` , `timestamp` AS `Submitted` , `status` AS `Status` , `friendly_name`
FROM `jobqueue`
INNER JOIN locations ON locations.mount_point = jobqueue.sourceroot
WHERE 1
LIMIT 0 , 30
edit i could actually just store the friendly name along with the moutn point in the job queue table. That would probably work for now.
Last edited: