Jump to content

Recommended Posts

i take it you will have 5 or 6 prices in the table base don age range?

 

item    price    ageRange

chair    10.50    30-35

chair    9.50      35-40  etc???

 

if so you can have an ageRange column which can just be a number (if there are ten age ranges then a number up to 10) and then the select statment would be

 

$query="SELECT chairPrice FROM table WHERE ageRange = 3" //if the third age range = 35-40

 

hope that makes sense

 

I have the database setup.  It has multiple products with multiple features that have different prices based on age and gender.  A single person, husband/wife, or family can get quotes and the prices are just added together.  i.e.... product A in blue is $X for a single person but product A in blue is $XY for a husband and wife or $XYZ for a husband wife and child.  I'm trying to figure out what would be the best way to sum (if needed) multiple results into a repeat region and have the price field show the value for either the single person getting quotes, the person + spouse, or the person + spouse + kid(s), and so on with different possible combinations.

 

I would be very thankful if somebody can point me in the right direction with a function name or a process I should be thinking about.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.