My final project for this semester, "Property Names and Addresses", is now complete. Here is the link: http://onepotcooking.com/johnpennisten/final_project/
As indicated in my Nov 29 blog with the Information Architecture and three wirescreens, this project is basically a database "association table" application between real estate properties and their related entities such as owners, managing agents, lawyers, accountants and banks. Examples of the three screens are shown below, one screen for properties, one screen for associations and one for related entities. The three database tables - all populated with test data - are "properties", "relationships" and "entities" under "jpennisten" in PhpAdmin.
(1) In the file "entity.php" under "johnpennisten/final_project" in WinSCP there is a working example of a three-way join between database tables. Note that I had to use column aliases (keyword "AS") in the "select" statement since two of the database tables have similar column names such as "name", "addr_1", "city" etc.
(2) In the file "index.php" although there is only one "mysql_query" statement there are two possible "select" statements for it, depending on whether an RSS feed is requested or not. For a "normal" query we need a "LIMIT" clause since we only want to display two properties at a time, whereas for an RSS feed we want ALL properties. So there are two "select" statements, one built by concatenating the "LIMIT" clause to the other.
(3) Also in "index.php" note the use of the PHP "CEIL" function to prevent the last page to be displayed from being blank or truncated. We learned about the "CEIL" function in the "PHP/MySQL" course (X52.9367) which I took at NYU last summer.
(4) As for JavaScript, in the "entity" screen note the message in red "primary tax mail recipient" which sometimes appears and usually doesn't appear. In "entity_view.php" this message has its own "span" which in CSS has "display: none". But if the "mail" flag in the database table "relationships" is set to "Y" for this entity, then JavaScript changes "el.style.display" to "inline" for just this one screen element.
(5) JavaScript is also used (a) to highlight the primary tax mail recipient among the radio buttons in the "relationships" screen and (b) to extract and pass the property id# when the image is clicked = an "onclick" event observer - in the home "properties" screen.
(6) Radio buttons in the "relationships" screen are built using a PHP "foreach" statement on the output array from the prior database "select" statement.



As indicated in my Nov 29 blog with the Information Architecture and three wirescreens, this project is basically a database "association table" application between real estate properties and their related entities such as owners, managing agents, lawyers, accountants and banks. Examples of the three screens are shown below, one screen for properties, one screen for associations and one for related entities. The three database tables - all populated with test data - are "properties", "relationships" and "entities" under "jpennisten" in PhpAdmin.
(1) In the file "entity.php" under "johnpennisten/final_project" in WinSCP there is a working example of a three-way join between database tables. Note that I had to use column aliases (keyword "AS") in the "select" statement since two of the database tables have similar column names such as "name", "addr_1", "city" etc.
(2) In the file "index.php" although there is only one "mysql_query" statement there are two possible "select" statements for it, depending on whether an RSS feed is requested or not. For a "normal" query we need a "LIMIT" clause since we only want to display two properties at a time, whereas for an RSS feed we want ALL properties. So there are two "select" statements, one built by concatenating the "LIMIT" clause to the other.
(3) Also in "index.php" note the use of the PHP "CEIL" function to prevent the last page to be displayed from being blank or truncated. We learned about the "CEIL" function in the "PHP/MySQL" course (X52.9367) which I took at NYU last summer.
(4) As for JavaScript, in the "entity" screen note the message in red "primary tax mail recipient" which sometimes appears and usually doesn't appear. In "entity_view.php" this message has its own "span" which in CSS has "display: none". But if the "mail" flag in the database table "relationships" is set to "Y" for this entity, then JavaScript changes "el.style.display" to "inline" for just this one screen element.
(5) JavaScript is also used (a) to highlight the primary tax mail recipient among the radio buttons in the "relationships" screen and (b) to extract and pass the property id# when the image is clicked = an "onclick" event observer - in the home "properties" screen.
(6) Radio buttons in the "relationships" screen are built using a PHP "foreach" statement on the output array from the prior database "select" statement.



No comments:
Post a Comment