PDA

View Full Version : Teaching Schedules via MySQL?


tsguitar2004
07-28-2004, 06:21 PM
So what I want to do is create a database that lists teacher names, email addresses, home pages (if any), phone numbers, and teaching schedules. That's a database no end user will see. Then, on one page on the site, I want to list the names, phone numbers, email, and home pages taken directly from the database (the page will just return information from the database so that if the database is changed, so are the pages). When the user clicks on a specific teacher's name, a pop up will display the teacher's name, number, email, home page, and teaching schedule (what class is taught during each period of the school day).

I want this info in a database because the classes taught often change throughout the year and having only one file to make changes to is easier than making a change to several different HTML documents. Ideally, I'd have a log in to allow each teacher to change his or her own schedule without needing me to do it for them, but that might be too much.

I know nothing about MySQL or PHP other than where to copy, paste, and delete things. That's taken me rather far, but this might be too complicated. Just wondering how to start attempting this and any advice you can tell me. Thanks.
-ts

wild wil
08-07-2004, 03:17 PM
Hi tsguitar2004,

I'm hoping to start my teacher training in September and the title of this post caught my eye. :) This is also my first reply to a posting in this forum and it just so happens you want to know something I have been using in developing my website, http://www.gamersXchange.co.uk, which is still being developed and only the xbox section of the site is working in the majority at the moment. It has a mysql backend database, with numerous tables and uses the php technology.

There are several things you will need in place to get started and I hope I'm not teaching my granma to suck eggs here, but here goes:

1) webspace that supports php/mysql or at least have them running locally on your computer.
2) I'm not to sure what how much infomation "teaching schedules" will contain. This needs to be clarified from the start.
3) a high-level design of the mysql table(s) would be the best place to start. If "teaching schedules" can be contained in one long field of the table then one table would be enough. But I should imagine you will need more in the way of a USERS table and a SCHEDULES table, which I think would make the database much more managable.
4) I use phpMyAdmin as the GUI to create and manipulate my mySQL tables.

Finally, I believe you will need to provide the users/ teachers login facilites to enable them to gain as to their specific "teaching schedule".

This is just the tip of the iceberg and there is plenty of scope for going deeper. The more functionality you want the deeper the complexity gets.

Hope it helps! :thumbsup:

dysfunctionGazz
08-16-2004, 12:47 AM
I am working on a very similar project.

Im a music promoter and i put on live bands... im working on a database which acts as my contact management and booking / listings system.

I have a tables for:

BAND INFO - band name, genre, description, website, telephone, general notes

EVENT INFO - event date, admission cost, other info

BAND SHOWS - band name, event date, slot (1st on, 2nd on etc), location

From the above table descriptions, you can see maybe see how this might work.

Notice how there are common names in the 3 tables i have specified... by using these common names you can select a value from one table, and then select records from a table where one of their values matches the one from the previous table. Its quite hard to get your head around the idea,
IE to see what bands play on a certain date, and display info about them, the query needs to pull thru info from all three tables.

I am getting close to nailing this, and i think our projects will be similar. when i have completed mine i can pm you the stuff.

tsguitar2004
08-16-2004, 03:20 AM
wild wil: Good luck in the teaching program. Send me a private message or an email if you have any questions about it and I'll do what I can to help out. I looked at your site, but I don't see anything similar to what I'm looking for. Right now I have a form created for teachers to put in their information, so I already have that defined. The district webmaster set up a FileMaker db that's doing the trick for now, but it seems that there is an easier way to run this without having to get the webmaster to make changes for me; plus, FileMaker seems like more of a beast than I need for this. phpMyAdmin looks like a pain to install and involves more information than I have access to. The webmaster position has been killed at our district, so there's no one to get in touch with to get that information. Is it an easy thing to install and it only *looks* difficult?

dysfunctionGazz: By tables, do you mean HTML tables that just hold the information or are you talking some kind of SQL table/db? And I sort of see how this would work. I'm looking to have a place for teachers to enter information, even edit information, and that info is stored in a db. Then, I'll have a page that calls information out of that db--like name, department, and email--and clicking on the name provides more details in a small pop-up--like teaching schedule, phone number, Web page.

As I said, there's a FileMaker solution in place right now, but it's pretty cumbersome and I can't make any changes directly to the file (don't have/know FileMaker or have access to that folder). Maybe the MySQL thing is a bit too much for me and my limited knowledge.

Sorry it took me so long to respond!
-ts

dysfunctionGazz
08-16-2004, 02:40 PM
yeah i meant MySQL tables, which i have set up :)


I gather that MySQL isnt very hard really.
Ive got my DB up and running, i have knocked together some cut&pasted sripts and i can confidently work with ONE table now.

IE i have a working "phone book" where i can add, edit and view band contact details, info, website link etc.

It just gets a little trickier when using more than one table.

Just do some google searches on linking tables in mysql and there are good tutorials. As i said, when i have completed my work, i will give u the code, it may just be a matter of changing the names of the fields etc as i think our projects would be similar

You would need probably 3 tables i think.

TEACHERS - teachername, age, phone, email
(a teacher would appear only on one row otherwise we'd be repeating addresses etc)

LESSONSTAUGHT - teachername, lesson
(eg. there might be 3 records that have the same teachername, but different lessons, IE Mr Jones teaches maths, english, frencH)

LESSONTIMES - lesson, date/time
(this has a record for every lesson and its respective time)

The LESSONSTAUGHT table has field names common to the other two, this is how the linking works i think. As i said im still learning the SQL syntax so i wont post that as may well be wrong, but i think that 3 table idea would provide all the data needed, if queried properly.

sad69
08-16-2004, 10:19 PM
Well from what it sounds like, you're going to need to get access to the server. And if you're not going to have an administrator handy, somehow you're going to need certain priviledges as well.

It's possible to use PHP with FileMaker:
http://www.fmwebschool.com/fxclass.htm

Right now, you've got FileMaker going, right? It sounds like there's a form up and running as well. Is this web-based?

If this is to be a web-based system, it's best to have your server configured to have: a webserver, PHP installed, MySQL installed and running.

Since you had a webmaster, I'm assuming there was a webserver, so no need to worry about that. It's just a matter of figuring out which webserver is running and taking the steps to install PHP and MySQL.

Without PHP and MySQL (or at least PHP and sufficient access to modify FileMaker along with FXClass), it's going to be pretty to get this up and running. You need to be able to create a series of tables as dysfunctionGazz mentioned, so you need access to FileMaker or the ability to get MySQL installed.

Then to access the database online in the scheduling format along with the login screen and all, PHP or some kind of server-side language needs to be available.

Without these things, I don't think you can get this online.

So there's a starting point for you anyway...
Sadiq.

tsguitar2004
11-21-2004, 03:53 AM
Just tying up loose ends!!

I was able to get the directory up and running because someone at a higher level than me set up a FileMaker db for me to post to. It's working well, now.

It's a weird situation because the school district owns the server and each school site has a sub-domain on that server. We have no access to install things like MySQL or to even password protect our directories. We're running Mac OS X server on Apache so .htaccess isn't working; I've tried and .htaccess makes no difference to how things display.

So, I got my schedules up and running, even though the code to make it happen was a pain in the butt (really long address to get the directory to display; the databases are on a different subdirectory, etc.). Thanks to the advice you gave out. Cheers.
-ts