jayemvee
02-01-2007, 11:06 PM
Hey im having a little trouble...
I am looping through a few tables to calculate interest rates heres the basics for the loop.
First is a foreach for the loan types and then nested inside that there is a while loop to come up with all the different banks information containing that loan type.
The kicker is now i need to make adjustments based on loan amount... so i have a table with
id
rate_sheet_id
high_loan_amount
low_loan_amount
adjustment
and what I need to do is test against the high and low loan amount and make an adjustment accordingly... A single sheet may have up to 3 or four of these which is why it is an a seperate table...
Do i run yet another while loop? or is there a single sql query i can run?
I am looping through a few tables to calculate interest rates heres the basics for the loop.
First is a foreach for the loan types and then nested inside that there is a while loop to come up with all the different banks information containing that loan type.
The kicker is now i need to make adjustments based on loan amount... so i have a table with
id
rate_sheet_id
high_loan_amount
low_loan_amount
adjustment
and what I need to do is test against the high and low loan amount and make an adjustment accordingly... A single sheet may have up to 3 or four of these which is why it is an a seperate table...
Do i run yet another while loop? or is there a single sql query i can run?