christensen.ken@gmail.com
Member
Sorry. My unfamiliarity with php. I thought I was commenting out the original lines with ';'. I now see that I should have used '//'
BTW, when I make a change like this, do I need to stop/start Apache? I have been, but also have been wondering if it's necessary.
[pre]
$fks=array();
foreach (execute_db($sql, $conn) as $row){
var_dump($row);
// $fks[$row['column_name']]['referenced_table_name'] = $row['referenced_table_name'];
$fks[$row['COLUMN_NAME']]['referenced_table_name'] = $row['REFERENCED_TABLE_NAME'];
// $fks[$row['column_name']]['referenced_field_name'] = $row['referenced_column_name'];
$fks[$row['COLUMN_NAME']]['referenced_field_name'] = $row['REFERENCED_COLUMN_NAME'];
}
[/pre]
Result.
[pre]
string(17) "caliber_or_gauges" string(8) "firearms" array(6) { ["COLUMN_NAME"]=> string(38) "caliber_or_gauges_caliber_or_gauges_id" [0]=> string(38) "caliber_or_gauges_caliber_or_gauges_id" ["REFERENCED_TABLE_NAME"]=> string(17) "caliber_or_gauges" [1]=> string(17) "caliber_or_gauges" ["REFERENCED_COLUMN_NAME"]=> string(20) "caliber_or_gauges_id" [2]=> string(20) "caliber_or_gauges_id" }
On-line registration done......your installation code is: 161295f98616f56684
string(17) "caliber_or_gauges" string(14) "dadabik_groups" string(13) "dadabik_users" string(8) "firearms" array(6) { ["COLUMN_NAME"]=> string(38) "caliber_or_gauges_caliber_or_gauges_id" [0]=> string(38) "caliber_or_gauges_caliber_or_gauges_id" ["REFERENCED_TABLE_NAME"]=> string(17) "caliber_or_gauges" [1]=> string(17) "caliber_or_gauges" ["REFERENCED_COLUMN_NAME"]=> string(20) "caliber_or_gauges_id" [2]=> string(20) "caliber_or_gauges_id" } string(17) "caliber_or_gauges"
[/pre]
This looks like it worked. When I choose table firearms and column cog_cog_id at the top, Forms configurator now populates the Lookup table and Lookup table primary key field.
The form preview looks OK, but when I Exit admin, the forms for both tables are simple searches forms. I don't have any rows in these tables, so maybe that's expected behavior. I guess now that my install problem is resolved I'll have to learn to use DaDaBik <smile>.
I'm going to make this same capitalization change to my dadabik app and remove the var_dump and row_dump operators. I'll let you know how it goes.
Thanks for working so hard (and late, yes?) on this.
Ken C
BTW, when I make a change like this, do I need to stop/start Apache? I have been, but also have been wondering if it's necessary.
[pre]
$fks=array();
foreach (execute_db($sql, $conn) as $row){
var_dump($row);
// $fks[$row['column_name']]['referenced_table_name'] = $row['referenced_table_name'];
$fks[$row['COLUMN_NAME']]['referenced_table_name'] = $row['REFERENCED_TABLE_NAME'];
// $fks[$row['column_name']]['referenced_field_name'] = $row['referenced_column_name'];
$fks[$row['COLUMN_NAME']]['referenced_field_name'] = $row['REFERENCED_COLUMN_NAME'];
}
[/pre]
Result.
[pre]
string(17) "caliber_or_gauges" string(8) "firearms" array(6) { ["COLUMN_NAME"]=> string(38) "caliber_or_gauges_caliber_or_gauges_id" [0]=> string(38) "caliber_or_gauges_caliber_or_gauges_id" ["REFERENCED_TABLE_NAME"]=> string(17) "caliber_or_gauges" [1]=> string(17) "caliber_or_gauges" ["REFERENCED_COLUMN_NAME"]=> string(20) "caliber_or_gauges_id" [2]=> string(20) "caliber_or_gauges_id" }
On-line registration done......your installation code is: 161295f98616f56684
string(17) "caliber_or_gauges" string(14) "dadabik_groups" string(13) "dadabik_users" string(8) "firearms" array(6) { ["COLUMN_NAME"]=> string(38) "caliber_or_gauges_caliber_or_gauges_id" [0]=> string(38) "caliber_or_gauges_caliber_or_gauges_id" ["REFERENCED_TABLE_NAME"]=> string(17) "caliber_or_gauges" [1]=> string(17) "caliber_or_gauges" ["REFERENCED_COLUMN_NAME"]=> string(20) "caliber_or_gauges_id" [2]=> string(20) "caliber_or_gauges_id" } string(17) "caliber_or_gauges"
[/pre]
This looks like it worked. When I choose table firearms and column cog_cog_id at the top, Forms configurator now populates the Lookup table and Lookup table primary key field.
The form preview looks OK, but when I Exit admin, the forms for both tables are simple searches forms. I don't have any rows in these tables, so maybe that's expected behavior. I guess now that my install problem is resolved I'll have to learn to use DaDaBik <smile>.
I'm going to make this same capitalization change to my dadabik app and remove the var_dump and row_dump operators. I'll let you know how it goes.
Thanks for working so hard (and late, yes?) on this.
Ken C