fefe64
Joined: 11 Dec 2006
Posts: 13
Posted: 2006-12-11 19:25
Back to top
Reply with quote
|
Hello i have to table
1) person: Id,Firstname, Lastname
2) game: gameID,gameIdperson,gametime
When i create a new game i wouldlike to see in the fiels
Idperson a select box: Firstname - Lastname
now i can just select the firstname or the lastname
but i would like to see twice and register the idperson
My code is:
$opts['fdd']['gameIdPerson] = array(
'name' => 'Person',
'select' => 'D',
'maxlen' => 65535,
'values' => array( 'table' => 'person', 'column' =>'idperson','description'=>'firstname', 'orderby' => 'firstname'),
'sort' => true
);
|
krisix
Joined: 08 Feb 2007
Posts: 2
Posted: 2007-02-08 12:30
Back to top
Reply with quote
|
Hi,
I think I have a similar problem.
I cannot figure out how to concatenate these two fields :
| Code: |
$opts['fdd']['Price'] = array(
'name' => '1st Item',
'input' => 'R',
'select' => 'N',
'options' => 'AVCPDR',
'maxlen' => 11,
'sort' => true
);
|
With this one :
| Code: |
$opts['fdd']['Curr'] = array(
'name' => 'Currency',
'input' => 'R',
'select' => 'D',
'options' => 'AVCPDR',
'maxlen' => 2,
'default' => '1',
'values' => array(
'table' => 'tblCurrency',
'column' => 'ID',
'description' => 'Currency'
),
'sort' => true
);
|
The result should be, for example :
1000 EUR
But everything I tried gives :
1000 1
, where 1 is the ID column of tblCurrency, not the description (EUR).
Does anyone have an idea how to concatenate these fields ? Thanks in advance.
|
krisix
Joined: 08 Feb 2007
Posts: 2
Posted: 2007-02-09 11:34
Back to top
Reply with quote
|
Hi Doug,
Thanks for the tip, but it keeps displaying the array key (1, 2, 3) instead of the array value.
If somehow I could use an array into a sql CONCAT statement, that would help.
|
michal
Joined: 17 Jun 2003
Posts: 537
Location: Slovakia
Posted: 2007-02-09 12:32
Back to top
Reply with quote
|
the concat should have currency part something like PMEjoin2.Currency (the number depends). experiment.
|
|
Post new topic
Reply to topic
|
|
|