PHP Arrays and combining two table calls

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kanshou
Forum Commoner
Posts: 47
Joined: Sun Aug 03, 2003 1:57 pm
Location: San Diego
Contact:

PHP Arrays and combining two table calls

Post by kanshou »

Ok, I am using an array to create a table that outputs a bunch of info, and right now, it is pulling the "short" column out of one of the tables that deals with names. I want it to be able to pull two columns out of a single table, and keep both of them in the same column when the array is created.

Here's what mine looks like so far:

Code: Select all

<?php
$oView->AddDef('columns', '', array('jcn', 'seq', 'dcl_wo_type.type_name', 'products.name', 'responsible.short', 'contact', 'contactphone', 'deadlineon', 'summary'));

$oView->AddDef('columnhdrs', '', array(
STR_WO_JCN,
STR_WO_SEQ,
STR_WO_TYPE,
STR_WO_PRODUCT,
STR_WO_RESPONSIBLE,
STR_WO_CONTACT,
STR_WO_CONTACTPHONE,
STR_WO_DEADLINE,
STR_WO_SUMMARY));

?>
It outputs a table showing the name "jdoe" and I want it to show both responsible.firstname and the responsible.lastname columns from the table - ex: "john" and "doe" while remaining under the same shown column of "STR_WO_RESPONSIBLE". Hopefully this makes sense.
User avatar
Lord Sauron
Forum Commoner
Posts: 85
Joined: Tue Apr 20, 2004 5:53 am
Location: Tilburg, NL

Post by Lord Sauron »

Not at all to be honest. Could you please explain AddDef by showing me some code?
Post Reply