Hello Everybody:
I have a little problem, I would like to combine two fields; $rec{'year'}, $rec{'month'}, and assign it as the value for my key field $rec{'yearmonth'}. I would like to do this so I can do calculations on the seperate fields to compare data across records.
I have come up with something like this;
join($rec{'year'}, $rec{'month'})
or alternately;
$rec{'yearmonth'}=($rec{'year'}*100)+$rec{'month'}
- I think this would work because I can manipulate it more.
But me real problem Is where to place the code, such that it will assign it to the $rec{'key_field'}. Another twist, I cannot place this in db.cgi, because I use it for multiple databases.
Can anybody help me?
-Don
I have a little problem, I would like to combine two fields; $rec{'year'}, $rec{'month'}, and assign it as the value for my key field $rec{'yearmonth'}. I would like to do this so I can do calculations on the seperate fields to compare data across records.
I have come up with something like this;
join($rec{'year'}, $rec{'month'})
or alternately;
$rec{'yearmonth'}=($rec{'year'}*100)+$rec{'month'}
- I think this would work because I can manipulate it more.
But me real problem Is where to place the code, such that it will assign it to the $rec{'key_field'}. Another twist, I cannot place this in db.cgi, because I use it for multiple databases.
Can anybody help me?
-Don

