Skip to main content
Inspiring
November 20, 2006
Answered

Creating secondary recordset from primary recordset

  • November 20, 2006
  • 1 reply
  • 265 views
Having created the first simple recordset (recordlookup) based on a search text box and displaying it in a dynamic table (only selected columns), I then embedded a post form with a submit in the table.

How do I then create a secondary recordset "recorddetail", based on a single selected row from "recordlookup"?

I attach some code I have tried, but it always returns the recordset, with the variable set at "1", rather than using the ID that I wanted.

Am I getting my syntax right for the variable or do I have to look at this another way?
This topic has been closed for replies.
Correct answer RichardOMarketing
Cracked it...

Had to use a URL variable in the link relating to each record....

/recorddetail.php?CONTACTID=<?php echo $row_recordlookup['CONTACTID']; ?>

The detail page can then use a single record recordset from the URL variable, identified by the linked info.

I know this is pretty basic for most but I only just learning!

Thanks for the help

1 reply

RichardOMarketingAuthorCorrect answer
Inspiring
November 20, 2006
Cracked it...

Had to use a URL variable in the link relating to each record....

/recorddetail.php?CONTACTID=<?php echo $row_recordlookup['CONTACTID']; ?>

The detail page can then use a single record recordset from the URL variable, identified by the linked info.

I know this is pretty basic for most but I only just learning!

Thanks for the help