Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Dummyfields and Subtables

phpMyEdit General     Dummyfields and Subtables
Post new topic   Reply to topic    
 
roland     Joined: 24 Mar 2006   Posts: 25  
Post 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
Post 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    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy