From: Iuri S. <iu...@iu...> - 2018-07-07 00:50:33
|
I’ve written the following palliative. db_with_handle db { set trigger_column_list [list] for {set i 0} {$i < [db_string select_fields { SELECT COUNT(*) FROM ec_custom_product_field_values} ] } {incr i} { lappend trigger_column_list [lindex [db_list select_name { SELECT name FROM ec_custom_product_field_values } ] $i] } } Too ugly! Would there be a beautiful code? Best wishes, I > On Jul 6, 2018, at 21:07, Iuri Sampaio <iu...@iu...> wrote: > > Hi there, > > What would be a derivative proc, which substitutes ns_column ? > > The piece of context is right bellow. > > Best wishes, > I > > > db_with_handle db { > set trigger_column_list [list] > for {set i 0} {$i < [ns_column count $db ec_custom_product_field_values]} {incr i} { > lappend trigger_column_list [ns_column name $db ec_custom_product_field_values $i] > } > } > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel |