For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > December 2007 > Sum function for multiple recordsets?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sum function for multiple recordsets?
jay@insuranceshoppers.net

2007-12-25, 3:59 am

I'm getting a health insurance quote engine going...

http://www.insuranceshoppers.net/ge...term-health.php

.... it sends me an email with the info, and enters the info into a "leads" table in mysql.

Then I want to have it show the rates (on a new page using $_GET) from a table I have setup with the rates of multiple companies. Since the rates are based on age and gender and it could be 1 or 2 people plus the possibility of adding children (the tota
l rate is just the sum of each persons individual rate), I've been working on making a recordset for the primary applicant, the spouse, and children and telling it to add them together. (that seems like the easiest way, but I'm a newbie)

My question: is there a php function or a way I can create the 3 recordsets in Dreamweaver and tell it to just add them up and display the results in a repeat region? And is this even the best way to approach it?

Cheers,

Jay

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com