473,491 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Linking Recordsets In Two Pages To Display Master And Detail Record

7 New Member
What I really want to do is to be able to link two pages together using an ID, The table involved displays an image stored on the File Server that has the image details stored in the Database called. THE Database used is MySQL

"Support" on a Table Called "profiles":

The problem is how do I get this piece of codes to link to a details page called "PATRONS_DETAILS.PHP" and display information about one particular database detail. With ID given below as: recordID ".$info['id'] . "
Expand|Select|Wrap|Line Numbers
  1. <td valign=bottom><a href=patrons_details.php?recordID ".$info['id'] . " class=nav4>+More</a></td></tr></table>"; 
  2. }
  3. ?>
  4.  
  5. /* I used this code to select a Database to use*/
  6. mysql_select_db("support") or die(mysql_error()); 
  7.  
  8. //I used this tp Retrieves data from MySQL Table 
  9. $data = mysql_query("SELECT * FROM profiles WHERE type_name = 'Patrons'") or die(mysql_error());
  10.  
  11. //Puts it into an array 
  12. while($info = mysql_fetch_array( $data ))
  13.  
  14. // This variable calls a function that I use to shorten the output of the string 
  15. displayed by the Database Table field called: 'profile_detail'
  16. $text = $info['profile_detail'];
  17.  
  18. //DISPLAY STARTS FROM HERE[/quote] [quote]"profiles"
  19.  
  20. Echo "<table width=100% class=table2><tr><td valign=top rowspan=2>
  21.  
  22. FILE SERVER LOCATION OF THE IMAGE TO BE DISPLAYED WITH THE DATABASE FIELD STORING THE IMAGE INFO CALLED "profile_photo"
  23.  
  24. <img src=C:/Inetpub/wwwroot/sites/supportbridges/www/profile/".$info['profile_photo'] ."></td>";
  25.  
  26. THIS PORTION OF HTML AND PHP CODES DISPLAY THE DATABASE FIELD STORING THE PROFILE NAME CALLED "profile_name"  AND ITS 
  27. CALLS THE VARIABLE FOR THE FUNCTIONS THAT SHORTENS THE "profile_detail" DATABASE FIELD INFO WITH . ".ShortenProfile($text)."
  28.  
  29. Echo "<td valign=top colspan=2><b>Profile:</b><b> ".$info['profile_name'] . "</b></td></tr><tr><td valign=top>".ShortenProfile($text)."</td>
  30.  
  31. This is the link that passes the RecordID to the next page
  32.  
  33. <td valign=bottom><a href=patrons_details.php?recordID=".$info['id'] . "class=nav4>+More</a></td></tr></table>"; 
  34. }
  35. ?>
Nov 16 '06 #1
1 2310
cassbiz
202 New Member
Whew :)

Your question and description is a little bit all over the place and real hard to follow.

As what I gathered from your question is the following. You want to retrieve an image from one database table and have it link together with another value that is located in a different table resulting in displaying a support page.

Is that correct?

If that is the case, read up on this thread http://www.thescripts.com/forum/thread562112.html
Nov 16 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

14
2927
by: diskoduro | last post by:
Hi!! Years ago I built a database to control the production of a little factory. The users wanted to work in a Windows Net workgroup so I created an mdb with all the tables and data an after...
4
2290
by: Mason | last post by:
This is probably an incredibly newbie-ish question. I just haven't had the cause to use many subforms before, so I'm pretty sure I just don't understand it correctly (even after reading up on it)....
2
423
by: ruca | last post by:
Hi, I have a master and a detail datagrid. I put detail grid showing insise of a column of master grid. The problem is that it's not what I really want. What I really want would be that the...
2
1355
by: Coen | last post by:
Hello, I have a strange performance delay of about 2 sec's in moving to the next row. I use multiple forms with each master-detail table relations. The master-table displays it's table rows in...
3
1555
by: sqlboy2000 | last post by:
Hi, I've just started playing around with master / detail pages and I'm trying to simply change the detail page displayed in the contentplaceholder control from code behind. I can't seem to find...
7
4527
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
0
1698
by: Mike Wilson | last post by:
Dear group, I have an invoice entry form, which is a simple Master fields / Detail grid. The main summary information of the invoice are stored in one table in a dataset, which is bound using a...
2
1208
by: Bill Gower | last post by:
I have a web app that will basically have two types of web forms, a locator form with a datagrid and a detail form. The locator form will display a list of objects such as customers etc. The user...
2
2520
by: Steve | last post by:
I'm working on a report for an existing database. The report will be a directory of over 500 employees and thus multiple pages. What do I need to do to show the first employee and the last employee...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4881
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.