How to make table from two dimension array

Discussion in 'Databases' started by tanvirtonu, Dec 4, 2007.

  1. #1
    I have a report like the following- [the expenses of each item under the item heading is recorded for a date of a particular month]. I cant format my report
    as I want but u can realize it.

    
    Jan 2007
    
    Fields/Months -    1          3        4           5 . . . . .              30   31
    
    labor(Total-$)
    Male                    4 
    Female                               8
    
    Staff Salary($)                                 4
    Jim
    Jerry                                                6
    John                                                        5
    
    Coal($)
    Transport                                         5
    David(Driver)                       5
    Johnson                          9
    
    .......so on 
    
    HTML:
    Now could anybody tell me how to make my database table for this report. This looks like a 2 dimension array of records. Should I build a table for each dimension like one for labor including the male and female as fields of that table. OR all fields in a single table including all those fields. As u can see each item is(or can be) recorded in a particular date of a month. It means record can be inserted at any date of a month. In this case if I make a single table, how can I insert record several times in a same month. It is a little confusing to me.Pls anybody tell me how to make table out of SUCH two dimension array.There must be a conventional way to do this.
     
    tanvirtonu, Dec 4, 2007 IP