Results 1 to 2 of 2

Thread: dynamic data columns

  1. #1
    Join Date
    Aug 2006
    Posts
    1

    dynamic data columns

    hi everyone,

    I have a mysql database that has a couple of columns that i want to dynamically store data in that is the total of other column data within the database. i can get the total to be saved in the totals column using the...

    update tableName set totalColumn((col1*col2)+(col3*col4));

    type of expression but this data won't automatically calculate/re-calculate the total if new data is added or changed like I would like it to.

    can anyone give me an idea of what I can use to dynaimcally set a column's data to so it will re-act as data is entered or changed within the database?

    thanx

  2. #2
    Join Date
    Sep 2006
    Posts
    5
    I "don't think" that is possible. How are you getting the data into the table? You should calculate and assign these values prior to inserting into your tables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •