Gossamer Forum
Home : Products : DBMan : Customization :

autogen $cols in relational mod

Quote Reply
autogen $cols in relational mod
I was looking at JP Deni's relational DB mod.... is there anyway to have $cols auto generated based on %db_def in the *.cfg file? I've got a lot of fields and hate to list them all.... and would hate to forget to change $cols if I added a field later.
Thanks!
Wes

sub switch_to_item {
#-----------------------------------------------------
$cols = 'UserID,ItemID,Item,Classification,Price,Description,DateAdded'; <----- can we auto gen this?
@db_cols = split /,/,$cols;
$db_file_name = $db_script_path . "/item.db";
$db_sort{'DateAdded'} = 'date';
Quote Reply
Re: [kd4rdb] autogen $cols in relational mod In reply to
There's gotta be a way... In the meantime if no one else points you in the right direction, I'll poke around and see what I can hack out.
Quote Reply
Re: [Watts] autogen $cols in relational mod In reply to
any success here? sure would be helpful!!!