Jump to content

joining 2 tables together using php


Recommended Posts

I really need help with this!!

Have THREE database tables

COURSEINFO---

Field            Type

-----------------------     

CourseCode    varchar(10)   

Semester            int(1)

CourseYear    int(1)           

Day                    varchar(10)       

Time                    varchar(5)   

Subject            varchar(100)

 

WEEKTIMETABLE

---------------

UserId varchar(10)

day varchar(10)

Time varchar(10)

Subject varchar(100)

CourseCode varchar(10)

Semester int(1)

CourseYear(1)

 

Userinfo

---------------

UserId    int(11)               

firstname    varchar(15)           

lastname    varchar(20)           

username    varchar(15)           

password    varchar(20)           

email        varchar(20)       

coursecode varchar(10)   

courseyear    int(1)

 

the user enters in all their details at regestration then they login into the system. I have all the seperate course information in course info. The main aim of the program is to be able to make a unique timetable for each member. I want an php statment that transfers all the course info rows depending on what course and year the user picks during registration. However as there is no userid in courseinfo and this is the unique idenitfier for the timetable and is necessary to extract it how will i do this???

 

many thanks for your help!its very urgent!!       

Link to comment
https://forums.phpfreaks.com/topic/152071-joining-2-tables-together-using-php/
Share on other sites

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.