Forum Moderators: coopster

Message Too Old, No Replies

mySQL, php.

...and helplessness

         

Justus

3:46 am on Mar 31, 2006 (gmt 0)

10+ Year Member



Hello, I know a (tiny) bit of php, and no mySQL, but I need to accomplish a good sized task: I've recently been put in charge of a folk school's website, and I need to have a database with all the class descriptions, who they're taught by, and ID number. Then, the users would have to be able to find a class by entering either an id number, or instructor, or just browse through all the available classes. Sorry I can't be more specific. Any help or pointers are greatly appreciated. :)

Dijkgraaf

8:14 am on Mar 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think your question is a bit beyond the scope of what is dealt here normally.
If you have specific questions you are likely to good a quick response, but a broad query like this is unlikely to get much.
A starting point would be to design the table(s)
By the sounds of it you need the following

Table: Class
Fields:
IDNumber - Int - Primary
Description - Varchar (however long)
TeacherID - Int

Table: Teacher
Fields:
TeachID - Int - Primary
FirstName - Varchar(40)
LastName - Varchar(40)

Does this give you a start?

This structure is based on the assumption that a Class is taught by a single teacher, but that a teacher can teach multipe classes.
I would think you would want more fields as well, like starting date, ending date, time, a long description etc.

Justus

1:56 pm on Mar 31, 2006 (gmt 0)

10+ Year Member



Okay, thanks. Can anyone point me to some good mySQL tutorials? Especially one that deals with that types to use with what kind of data.

coopster

4:02 pm on Mar 31, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The MySQL manual itself has a tutorial [dev.mysql.com] to get you started. There is also a page on Choosing the Right Type for a Column [dev.mysql.com] and some associated menu links that might get you started down the right path.