0

Hi

I'm trying to parse a recordID from a table of data in one page and pass data based on the chosen record to another page.
The data is taken from a database and I've used recordsets:
I have one recordset called rs_search which contains data from 2 tables called property_details and address_images, where they are connected by the field prop_id. (The address_images table also has the field images_id.
What I'm trying to do is have the link below take data from a subset of information and then show an extended amount of the same information on another page called propertylisting_details.php

The address_images table contains the images which are to be shown in the propertylisting_details.php page. The rest of the information is taken from the property_details table.

The link below is not picking up any record id from prop_id.

Any help would be much appreciated. Many thanks

propertylisting_details.php?recordID=<?php echo $row_rs_search ['prop_id']; ?>
2
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by ebanbury
0

What exactly is your problem?
Does propertylisting_details.php?recordID=nnn work? (Replace nnn with any valid record number.)
Does $row_rs_search contain a value?
Show the code in propertylisting_details.php where you query the database.

0

Hi Many thanks for getting back to me so quickly. I really appreciate it.
To answer your questions in order:

Yes - when I put in a valid record number to recordID=nn - yes that works.
$row_rs_search does contain a value, as the prop_id field is automated. No records will be null.

My query on the propertylisting_details.php page is as follows:

mysql_select_db($database_iwalletc_localhost, $iwalletc_localhost);
$query_rs_search = "SELECT * FROM property_details, address_images WHERE address_images.prop_id = property_details.prop_id";
$rs_search = mysql_query($query_rs_search, $iwalletc_localhost) or die(mysql_error());
$row_rs_search = mysql_fetch_assoc($rs_search);
$totalRows_rs_search = mysql_num_rows($rs_search);mysql_select_db($database_iwalletc_localhost, $iwalletc_localhost);
$query_rs_search = "SELECT * FROM property_details, address_images WHERE address_images.prop_id = property_details.prop_id";
$rs_search = mysql_query($query_rs_search, $iwalletc_localhost) or die(mysql_error());
$row_rs_search = mysql_fetch_assoc($rs_search);
$totalRows_rs_search = mysql_num_rows($rs_search);
0

Apologies, forgot to answer your first question. In my original page I have a search form which brings up a list of properties based on the selected search criteria. In each of the property listings, I have put some text saying >>click here for further details<< - I want to add a link to that text so that when the user clicks on it they are taken to a much expanded description of that particular propoerty. - Currently my link is not bringing up the corresponding record.

0

If propertylisting_details.php?recordID=nnn works, but your generated links do not, there must be an error in generating them. How does the HTML source code of these links look in the generated page?

0

Hi. It is working now. I had missed out putting the field in my original query. Many thanks for the help. It is really helpful just to have someone to prompt with the list of things to check through. Many thanks.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.