Databases and Complex forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Charles E. Pelkey

    #1

    Databases and Complex forms

    Hi all,

    Got a question for y'all regarding the best way to maintain HUGE forms and
    linking them to data tables in MySQL.

    I have a set of forms that were created specifically for a Loan Services
    Company (ranging from request forms to complex inspection forms with
    hundreds of input fields (such as room size, item quantity, item quality and
    costs) the problem I had in the initial setup was how to create the
    associated data tables for each type of form. I opted to store ONLY the
    client information, type of report and a few other miscellaneous items in a
    table called reports and the rest of the data is dumped into an INI format
    file using a php class that reads and writes ini files.

    This current setup works, but not all the fields from the reports are
    searchable. Additionally, going this route I had to modify all the forms and
    create the associated report format (no form fields, just echoing the
    correct data back where needed) and this is not user friendly enough (as if
    the forms change, then the report format must change as well). Does anyone
    have any recommendations on how best to modify this to use MySQL tables to
    store the data without overloading the database? Or am I going about this
    the wrong way???

    Looking forward to your responses,
    -Chalres


  • Tim Van Wassenhove

    #2
    Re: Databases and Complex forms

    On 2003-11-08, Charles E. Pelkey <cpelkey@charte r.net> wrote:[color=blue]
    > Hi all,
    >
    > Got a question for y'all regarding the best way to maintain HUGE forms and
    > linking them to data tables in MySQL.
    >
    > I have a set of forms that were created specifically for a Loan Services
    > Company (ranging from request forms to complex inspection forms with
    > hundreds of input fields (such as room size, item quantity, item quality and
    > costs) the problem I had in the initial setup was how to create the
    > associated data tables for each type of form. I opted to store ONLY the
    > client information, type of report and a few other miscellaneous items in a
    > table called reports and the rest of the data is dumped into an INI format
    > file using a php class that reads and writes ini files.[/color]

    *) First let's clean up our datastorage a little

    I'd suggest you make a table (or if you have different datatypes, a
    couple of tables).
    dumps(dump_id,n ame,value);

    Then you setup a table to link the dumps with the reports.
    reportdumps(id, report_id,dump_ id);

    Now you can easily lookup all the extra data added to a report.


    *) Now create a FormGenerator class (or find one on the net and adapt it
    to your needs).


    --
    Visit my website at http://home.scarlet.be/~vwadsl
    My jabber handle is aardbei@jabber. org

    Comment

    Working...