dinasbran Posted January 14, 2009 Share Posted January 14, 2009 Hello, I am new to PHP.Ive studied all about variables ,loops and Arrays,and Ive also done a lot on mysql commands,and HTML boxes,but now I am having a bit of trouble putting them together. I have succesfully managed to call and display info for one table in my SQL database,but I am finding it difficult to call fields from more than one table and combine them on a form(online table). I have three tables in my database.(Its a small cross country runners database for the running club that I am a member of) Table 1(members) Fields Name.....AGE.....Address.....Sex.....Height....Weight. Table 2(Events) Fields Nameofrun....date....distance....location...fintime(finishing time)....finpos(finishing position) Table 3(Members Events) Nameofrun....Date of number of runners....distance....location....winner...otherpos(otherpositions)...name of entrants. As you can see it is a simple database,and through code I can fetch any of the fields up from each Table.The problems I have result in trying to combine the results My problem is if I wanted to bring up a past event that combine the profile of a member(I would use Members and Mebers Events table for that) with an event run(and other similar things) The idea is to place buttons on a table and get them to post back the info on the form. Does anyone have any suggestions or could anyone point me in the direction of a tutorial or a similar thread on this site(I have had a browse but haven't found anything yet) Regards Jamie Link to comment https://forums.phpfreaks.com/topic/140795-accessing-and-displaying-more-than-one-table/ Share on other sites More sharing options...
trq Posted January 14, 2009 Share Posted January 14, 2009 There is actually a tutorial on our site (here) that should get you started. Link to comment https://forums.phpfreaks.com/topic/140795-accessing-and-displaying-more-than-one-table/#findComment-736924 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.