• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Two values to detail page

Community Beginner ,
Oct 12, 2010 Oct 12, 2010

Copy link to clipboard

Copied

This question is based around a simple master - detail page set.

Environment is Windows XP - Dreamweaver CS5 - Apache - MySQL - PHP (all should be up to the latest levels)

This is all under a local server environment.

I have a single table in MySQL with about 12 columns/fields. The Master page lists 2 columns ('Name' and 'DateOfArrival' - both CHAR columns) in a repeating group. The Detail page is selected by clicking on the 'Name' column of the row required. It displays the contents of all the columns for this record.

I've based the coding based on the Master - Detail example in 'Adobe Dreamweaver CS5 Classroom in a book'.

The coding works when the 'Name' column is unique. However, the 'DateOfArrival' column is used to make the record unique and needs to be passed with the 'Name' column. I seem to have tried most combinations (over the last 5 hours) but am obviously doing something wrong. The last attempt had the Link field set to

EllisIslandDetail.php?Name=<?php echo $row_rsEIList['Name']; ?>&DateOfArrival==<?php echo $row_rsEIList['DateOfArrival']; ?>

where EllisIslandDetail.php is the Detail page

rsEILIST is the record set associated with the Master page.

Hope someone can set me in the right direction on what is probably a very simple error.

Thanks

Cliff

TOPICS
Server side applications

Views

397

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 12, 2010 Oct 12, 2010

Copy link to clipboard

Copied

>The coding works when the 'Name' column is unique.

>However, the  'DateOfArrival' column is used to make the

>record unique and needs to be  passed with the 'Name' column.

That's a good reason to always use surrogate primary keys. Can you alter your table to use a single, unique key like an autoincrement number? It's also a bad idea to use an intellegent key like 'name' as a primary key part.

>EllisIslandDetail.php?Name=<?php echo $row_rsEIList['Name'];

>?>&DateOfArrival==<?php echo $row_rsEIList['DateOfArrival'];  ?>

I don't know php, but is there a reason for the double "==" in there?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 14, 2010 Oct 14, 2010

Copy link to clipboard

Copied

LATEST

Thanks for the quick response.

I know under third normal form the key should have been unique but I was hoping that it would work without duplicating data or setting up artificial keys. At any rate your reply provided a working solution (and thanks again).

The second '=' was put in by Dreamweaver. When I spotted it the first time I removed it but then Dreamweaver reinserted the code.

Cliff

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines