Dynamic Web Pages Ch 7 V1.0

Preview:

DESCRIPTION

 

Citation preview

1

Chapter 7Chapter 7Chapter 7Chapter 7

SQL with Joins & Recordset SQL with Joins & Recordset PagingPaging

2

Overview• In this chapter you will:

– Use the SQL term INNERJOIN.– Adding a recordset navigational tool

bar.

3

tours_detail.php - 1• For this activity you are going to;

– create a page that joins the information from two tables on a set of criteria.

– Add a recordset paging object.

• The page is shown on the next two slides.

4

Part 1 of tours_details.php

5

Part 2 of tours_details.php

• Adding recordset Paging

6

tours_detail.php - 2• Open generic_template.php

– Title: Newland Tours: Tour Descriptions.

– Save as tour_details.php.

• Make the following changes to the page as shown.

Heading 2

Link to tours.php

7

tours_detail.php - 3• Create a recordset as follows;

8

tours_detail.php - 4

Using the recordset add the bindings and the repeat region ( 5 records at a time), to the page as shown.

Dynamic image

Table width=60%

For these links refer to following slides.

9

tours_detail.php - 5• The link “Learn more about” has

the following details.

10

tours_detail.php - 6• Price this tour with Tour price

calculator.

11

tours_detail.php - 7• Insert the dynamic image’s placeholder

and set it right align.

12

Adding a repeat region• Highlight all the recordset data.• Select the server behaviour tab.• Click on the plus symbol and

select repeat region.• Select five records at a time, as

shown below.

13

Part 2Recordset Navigation-1

• Inserting a recordset navigation can be done by the following two.

14

Recordset Navigation-2• When you add a navigation the

recordset dialog appears as shown.

• Save and preview.

15

Fixing up the tourprice.php page

• Create a querystring variable as shown below.

• Click to select the drop-down menu in the form, beside Tour name. In the Property inspector, click the Dynamic button. Shown on the next slide.

16

Dynamic list

Click on the lighting bolt and the Dynamic Data dialog box appears.

17

Lab 7 -1• This lab creates a page called

bookedtours.php.• The tour bookings information is

shown on the next slide.

18

Lab 7 -2

Recommended