Hi, not really sure if this should be in this forum or the php one but here goes. Any advice at all would be appreciated. I think it's a really simple thing to do but I've no idea how because i've only ever used mysql databases in forums etc which just need me to run an install scripe (ie when somebody else has done all the hard work). same goes for php really, though I know the basics of that. Basically, I want to have a stats page on my site showing a table with some statistics in it, the information in the table needs to change completely every week though. I could just make a page with a table in it and delete the information every week then type in the stuff but to be honest I don't really fancy that because I just use notepad or wordpad to make pages rather than something like dreamweaver and it's annoying (and slightly confusing) having to change it all every week. So what i'm wanting to make is a page with a table in it that will grab information from a mysql database and use it fill the table. I've no idea how to do this or how simple it is but I know it's possible (i think lol). One thing that I'm not sure of the answer to (apart from how to do it) is whether it would be able to add rows to the table automatically if there are more rows in the database (eg, if the table was to show exam results for every pupil in the class and one week there was 10 pupils, the next week there were 20) Has anybody got any advice or tips? Or even know of something that I could download and change to suit? Any help at all is appreciated. I'm not even sure if what I'm thinking of is the easiest way to achieve what I want really. Thanks
You can do this by having 2 tables in 1 DB. table 1 stores all marks, grades etc. Table 2 stores attendance status, monthly or weekly or even daily for each student. Then with a query, select the attendance, match names of students,(weekly, monthly or daily as required), from table1, (Runs a loop), Another query here gets marks for this student, only if attendance status "present". Then print marks, or absent as per required. Sounds simple, but will require someone to update the DB(s) using html forms on a regular basis. Then in case of mistakes while entering data, one will need a mechanism to make changes to already inserted records at a later time. Again another web form and more programming. Looks like a complete project to me... Bye
If your database is designed properly, how many rows a query returns in irrelevant. The query will cope with anything between zero and however many rows that database can handle. What you need is just a simple query and output and once you nail that down, stick that in a cron job.