phpMyEdit - Viewing Bug Advanced Details [ Go Back ]
251 core / field option crash always 2004-06-14 01:03 2004-07-20 11:31
cwyble p2 1gig mem  
linux  
normal 2.4  
feedback 5.4 (stable)  
1.121 and 1.43 open  
none  
none  
get error when doing intersect table between two other tables
Using Linux, php 4.3.6 apache2

Have a medication table, and a warning label table each with a unique int id.

trying to manage a table that only has links to the two other tables. I call it an intersect table that creates a n to n relationship between the two other tables by simply keeping an index of each of the other two tables in each row.

Then I used the code below to display info from the other tables instead of the integer values and when I do a delete I get this error:

Warning: array_keys(): The first argument should be an array in /home/cwyble/public_html/ph/phpMyEdit.class.php.1.121 on line 2476

the setup / control file for this is:

$opts['fdd']['med_index'] = array(
'name' => 'Med index',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => false
);


$opts['fdd']['med_index']['values']['db'] = 'pharmacy';
$opts['fdd']['med_index']['values']['table'] = 'medications';
$opts['fdd']['med_index']['values']['column'] = 'med_index';
$opts['fdd']['med_index']['values']['description']['columns'][0] = 'name';
$opts['fdd']['med_index']['values']['description']['divs'][0] = ' ';
$opts['fdd']['med_index']['values']['description']['columns'][1] = 'strength';
$opts['fdd']['med_index']['values']['description']['divs'][1] = ' / ';
$opts['fdd']['med_index']['values']['description']['columns'][2] = 'per';
$opts['fdd']['med_index']['values']['orderby'] = 'name'; // optional ORDER BY clause

$opts['fdd']['warningID'] = array(
'name' => 'WarningID',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => false
);

$opts['fdd']['warningID']['values']['db'] = 'pharmacy'; // optional
$opts['fdd']['warningID']['values']['table'] = 'warnings';
$opts['fdd']['warningID']['values']['column'] = 'warningID';
$opts['fdd']['warningID']['values']['description']['columns'][0] = 'warning';
$opts['fdd']['warningID']['values']['orderby'] = 'warning';

Also am not able to edit a row. When I click on the change button or graphic I get a blank edit screen with no fields on it.
I will give you a link and login to my web application if you need to see it.
???? If I know the solution, I would gladly share it and I will continue to search for the answer.

Bug Notes
michal   
2004-06-18 10:38   
in the call to 'description' in 'warningID' try to use 'description'] = 'warning'; and not 'desription']['columns']['0'] = 'warning';
admin   
2004-07-20 11:31   
Charlie's response:

Got it . Thanks. That fixed it.