Jump to content

Accessing and displaying more than one table


dinasbran

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.