dynamic web pages ch 7 v1.0

18
1 Chapter 7 Chapter 7 SQL with Joins & Recordset SQL with Joins & Recordset Paging Paging

Upload: cathie101

Post on 15-Jan-2015

505 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Dynamic Web Pages Ch 7 V1.0

1

Chapter 7Chapter 7Chapter 7Chapter 7

SQL with Joins & Recordset SQL with Joins & Recordset PagingPaging

Page 2: Dynamic Web Pages Ch 7 V1.0

2

Overview• In this chapter you will:

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

bar.

Page 3: Dynamic Web Pages Ch 7 V1.0

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.

Page 4: Dynamic Web Pages Ch 7 V1.0

4

Part 1 of tours_details.php

Page 5: Dynamic Web Pages Ch 7 V1.0

5

Part 2 of tours_details.php

• Adding recordset Paging

Page 6: Dynamic Web Pages Ch 7 V1.0

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

Page 7: Dynamic Web Pages Ch 7 V1.0

7

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

Page 8: Dynamic Web Pages Ch 7 V1.0

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.

Page 9: Dynamic Web Pages Ch 7 V1.0

9

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

the following details.

Page 10: Dynamic Web Pages Ch 7 V1.0

10

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

calculator.

Page 11: Dynamic Web Pages Ch 7 V1.0

11

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

and set it right align.

Page 12: Dynamic Web Pages Ch 7 V1.0

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.

Page 13: Dynamic Web Pages Ch 7 V1.0

13

Part 2Recordset Navigation-1

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

Page 14: Dynamic Web Pages Ch 7 V1.0

14

Recordset Navigation-2• When you add a navigation the

recordset dialog appears as shown.

• Save and preview.

Page 15: Dynamic Web Pages Ch 7 V1.0

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.

Page 16: Dynamic Web Pages Ch 7 V1.0

16

Dynamic list

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

Page 17: Dynamic Web Pages Ch 7 V1.0

17

Lab 7 -1• This lab creates a page called

bookedtours.php.• The tour bookings information is

shown on the next slide.

Page 18: Dynamic Web Pages Ch 7 V1.0

18

Lab 7 -2