| Index
» Projects
» phpMyEdit
» Forum
» Dummyfields and Subtables |
 |
roland
Joined: 24 Mar 2006
Posts: 25
Posted: 2006-12-07 16:21
Back to top
Reply with quote
|
Hello,
I have a problem with this code:
-----------
...
//Dummyfeld
$opts['fdd']['katdummy1'] = array(
'name' => 'KatDummy1',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => false,
'sort' => true,
'options' => 'L',
'sql' => 'kategorien_id'
);
$opts['fdd']['kategorien_id'] = array(
'name' => 'Kategorien_ID',
//'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => false,
'sort' => true,
'values' => array(
'table' => 'kategorien',
'column' => 'kategorien_id',
'description' => 'kategorien_name'
)
);
...
-----------
with the field kategorien_id in the main table, I want to list
a) the kategorien_id (with the Dummyfield katdummy1)
b) the content of kategorien_name from the subtable kategorien, where the link-field is also the kategorien_id.
I allways get the message "Column 'kategorien_id' in field list is ambiguous".
I don't find out, how to do it in the right way. Can somebody help me, please.
Thx roland
Hello - can anybody help please?
|
zucarino
Joined: 29 Dec 2005
Posts: 44
Location: Rio de Janeiro - Brazil
Posted: 2006-12-08 11:03
Back to top
Reply with quote
|
| roland wrote: |
I allways get the message "Column 'kategorien_id' in field list is ambiguous".
I don't find out, how to do it in the right way. Can somebody help me, please. |
Hi,
MySQL don't accept this kind of lookup when the keys are equal. Try change the second key to something like 'kategorien_fid' (foreign key).
_________________ ---
Victor Zucarino
vffzbr at yahoo dot com dot br
|
|
Post new topic
Reply to topic
|
|
|
|