database design help

Discussion in 'MySQL' started by epowelljr, Mar 15, 2012.

  1. #1
    <?php
    include("../../temp_con/config.php");

    // The above include file has established a connection to a database that has sample person and financial data
    // I need to do the following with the data. Can someone write the example code for the following

    // 1. Display each person's information (Name, Address, Phone, Email) followed by the financial history ordered by date in ascending order.
    // 2. Format the phone number as (xxx) xxx-xxxx
    // 3. Format date as mm/dd/yyyy.
    // 4. Determine and display the outstanding balance for each person at the end of their financial history.
    // 5. Lastly, update the "balances" table to the outstanding balance for the person at hand (currently all balances in this table are 0.00).

    // Database information:
    // Below are the details concerning the tables
    // 4 tables "people", "address", "charges" and "balances"

    // table people columns: peopleID, lastName, firstName, emailAddress, phone
    // table address columns: id, peopleID, address_line_1, address_line_2, city, state, zip
    // table charges: id, peopleID, date_created, description, type (5=charge; 10=payment), amount
    // table balance: id, peopleID, balance


    ?>
     
    epowelljr, Mar 15, 2012 IP
  2. Amator

    Amator Well-Known Member

    Messages:
    1,424
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    165
    #2
    This looks like homework for school :confused:
     
    Amator, Mar 16, 2012 IP
  3. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #3
    Because it is :eek:
     
    GMF, Mar 16, 2012 IP