After completing the master page (see Creating a URL parameter for the links (PHP)), switch to the detail page. You must find the requested record in the database and display it on the page. The procedure consists of defining a recordset to hold a single record--the record requested by the master page--and binding the recordset columns to the page.
To find and display the requested record on the detail page:
1. Switch to the detail page or create a new PHP page if the page doesn’t exist.
2. In the Bindings panel (Window > Bindings), click the Plus (+) button and select Recordset (Query) from the pop-up menu.
The simple Recordset dialog box appears. If the advanced Recordset dialog box appears instead, click Simple to switch to the simple Recordset dialog box.
3. Name the recordset, and then select a connection and the database table that will provide data to your recordset.
4. In the Columns area, select the table columns to include in the recordset.
The recordset can be identical to or different from the recordset on the master page. Usually a detail page recordset has more columns to display more detail.
If the recordsets are different, make sure the recordset on the detail page contains at least one column in common with the recordset on the master page. The common column is usually the record ID column, but it can also be the join field of related tables.
To include only some of the table’s columns in the recordset, click Selected and select the desired columns by Control-clicking (Windows) or Command-clicking (Macintosh) them in the list.
5. Complete the Filter section as follows to find and display the record specified in the URL parameter passed by the master page:
» From the first pop-up menu in the Filter area, select the column in the recordset containing values that match the value of the URL parameter passed by the master page. For example, if the URL parameter contains a record ID number, select the column containing record ID numbers. In the example discussed in the previous section, the recordset column called CODE contains the values that match the value of the URL parameter passed by the master page.
» Select the equal sign (if it is not already selected) from the pop-up menu beside the first menu.
» Select URL Parameter from the third pop-up menu.
The master page uses a URL parameter to pass information to the detail page.
» In the fourth box, enter the name of the URL parameter passed by the master page.
For example, if the URL that the master page used to open the detail page included the suffix locationDetail.php?recordID=CBR, then enter recordID.
The Recordset dialog box should look as follows:
6. Click OK.
The recordset appears in the Bindings panel.
7. Bind the recordset columns to the detail page by selecting the columns in the Bindings panel (Window > Bindings) and dragging them onto the page.
The PHP master/detail page set is done.
Tuesday, September 30, 2008
Finding and displaying the requested record on the detail page (PHP)
Subscribe to:
Post Comments
(
Atom
)
About Me
- Rakesh Sharma
-
Web Designer | Blogger | Web Addict
Follow on Google+
Recommend on Google +1
RSS Feed
Subscribe Recent Posts
Popular Posts
-
If you are looking 'how to put a any form in a blogger' then this post is going to help you. Putting a form in blogger is very easy....
-
If you are looking for free e-books for Web Design and Development then this post is for you. Here I have shared some very useful e-books wi...
-
When you write a CSS for your project you never know what kind of bug or issue you will face at time of browser compatibility. Internet Ex...
-
Cooliris is simply the fastest and most stunning way to browse photos and videos from the Web or your desktop for free. Effortlessly scroll...
-
Now a days every one intend to aware about HTML5 more and more. According to experts HTML5 is a future of the web. There are some interestin...
-
jQM (jQuery Mobile) becoming very popular now a days. Mobile developers from across the world contributing their knowledge to make it more u...
-
In web development scripts like jQuery and Ajax becomes very handy for web developers. If you are a learner or a expert these scripts is rea...
-
In this post I'm sharing a list of XML based CMS (Content Management System) to help web designers and developers. CMS usually implement...
-
Today I would like to share that how to add a Facebook fan list to your blog or website (like I have added here at right sidebar). This is t...
-
Today I am really happy to anounce that I have launched new social book marking site called ' TutLinks '. This is a first networkin...
0 comments :
Post a Comment