Display results from four tables (Full Version)

All Forums >> [Web Development] >> Dreamweaver Help



Message


cdrees -> Display results from four tables (8/7/2007 17:02:54)

Hey all,

Quick question... I have a results form that has a main table (audit) and three other tables that contain model number, requestor and status. Each of those tables has a table_id, which corresponds to the table_id in the audit table.

In other words, the audit table has:

audit_inv_id
audit_srvNAme
audit_status_ID
audit_date
audit_modelID
audit_reqID
action

The requestor table has:
req_id
req_lastname
req_firstname

etc., etc..


In my main form I want to display

Server Name - Status - Model - Date - Requestor - Action
===============================================
Name 1 6 7/7/2007 3 Inserted


So basically, the actual records in the audit table contain just ID for status, model, etc. The labels (or names) for what they mean live in their respective table.

I want to lookup the value of each, and return those values in my form. For whatever reason, I not quite getting it to work...

I'm using Dreamweaver, ASP and SQL 2000 with IIS 6.0. Thanks!

Any help would be appreciated!!


Regards,

Christopher Rees
President,
Palaestra Training
www.palaestratraining.com
1-800-324-0946




mar0364 -> RE: Display results from four tables (8/8/2007 13:08:34)

I' don't think I understand your question. I think your trying to populate a drop down menu in a form from a table? Is that the case? If that table has duplicate values and you just want to show one of each you can select DISTINCT in you SQL.

Hope that helps [sm=ask.gif]




cdrees -> RE: Display results from four tables (8/8/2007 14:03:59)

Actually I want to show a dynamic list.. no drop downs, so it's basically a dynamically generated table of just text - no fillable fields, with the data being pulled from 4 tables.

The main table has on the IDs for several fields, those IDs correspond to the field names that exist in the other tabels ("lookup" tables)

Thanks!!





mar0364 -> RE: Display results from four tables (8/9/2007 8:40:06)

Sounds like you just need to write a SQL statement. I would try creating my statment in design view if your not real good with SQL.




rdouglass -> RE: Display results from four tables (8/9/2007 9:57:43)

quote:

Sounds like you just need to write a SQL statement.


I agree. I'd start looking at the UNION command. That's what it does.

<$.02>




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125