I have a table (MySQL 3.23) which is logging registrations for a conference. Registrants need to select various price options depending on which day they are attending. These selections are stored in separate fileds in the table. I would like to total these for each record so they can be displayed and used as part of an email later in the script.
Will MySQL do this in a field automatically or do I need to write it into the confirmation page?
Thanks in advance
You should be able to do something like this:
select sum(d.cost) from users u left join days d on (u.id=d.id) group by u.id
Assuming your structure here, but you get the idea, right?