Welcome to Scoreattack.net Sign in | Join | Faq

www.scoreattack.net

Started by tabitha at 02-20-2006 2:48 AM. Topic has 21 replies.

Print Search
Sort Posts:    
   02-20-2006, 2:48 AM
tabitha is not online. Last active: 1/5/2008 9:16:03 AM tabitha



Top 10 Posts
Joined on 01-22-2006
Posts 536
Database creation advice request.
Reply Quote

What I would like to do is something like this.

1 - have a table for each player containing scores for each level which I can update as new scores arrive.

2 - Display the results for these tables per dream more or less the same as they are now on the page.

3 - Have 1 additional page with something like total scores/average scores etc for each player.

Also I want to do this in the simplest possible way which doesnt involve editing pages and pages of HTML all the time.

I have done a little reading on ASP/Excel and PHP/mySQL and while both of these appear to do the job I am not sure if there is an easier way. Anyone have any ideas?


   Report 
   02-20-2006, 2:13 PM
EVL is not online. Last active: 3/28/2007 5:45:53 AM EVL



Top 10 Posts
Joined on 01-30-2006
UK
Posts 83
Re: Database creation advice request.
Reply Quote
First of all, don't have one table for each player. A number of reasons for this - it would be a pain to maintain, it would get messy if the site gets busy, and most importantly it would be a nightmare to write sql to pull the data out.

Probably the simplest way to do it would be to have one score table, one column for the player, and one column for each of the scores. There are better ways to do this, but they'd involve more complex sql.

As far as what to use goes, don't try using something like excel - it's not really designed for this sort of thing. I don't know what your web hosting company offers, but PHP/mySQL would do the job.

By the way, there would be no editing pages of HTML necessary once it's done.


   Report 
   02-20-2006, 8:01 PM
tabitha is not online. Last active: 1/5/2008 9:16:03 AM tabitha



Top 10 Posts
Joined on 01-22-2006
Posts 536
Re: Database creation advice request.
Reply Quote
So basically one massive table with I think, *does a quick bit of maths*

7 drams with 4 mares = 24
7 total dream scores
7 bosses
I will worry about xmas nights later

so a table with columns and 1 row for each player then quesry the table using php?

If thats the way forward I will get on it. My hosting company has mySQL on the server via a slightly wierd graphical interface called phpadmin I belive.

Thanks for the advice.


   Report 
   02-21-2006, 3:16 AM
EVL is not online. Last active: 3/28/2007 5:45:53 AM EVL



Top 10 Posts
Joined on 01-30-2006
UK
Posts 83
Re: Database creation advice request.
Reply Quote
If you wanted to put each dream in a table of it's own, that wouldn't hurt, and would possibly make things slightly more manageable.

If you do do this though, create a master table for the players, one column for the player name, and one with an id (mySQL would provide an autoincrement field which would probably be the way to go). Then in each of the score tables, rather than storing the player name against the scores, you store the id. This would reduce a few possibilities for error, and allow you to add more specific data about a player if you wanted to in the future (for example tying their id on the scoreboard to their id on the forum).


   Report 
   02-23-2006, 11:00 AM
tabitha is not online. Last active: 1/5/2008 9:16:03 AM tabitha



Top 10 Posts
Joined on 01-22-2006
Posts 536
Re: Database creation advice request.
Reply Quote
Well, im going with the big database with all the score in it with the user id being the unique field just to get things rolling for the moment. I have the table created at last and entering all the scores is just legwork. The way it is set up does seem to make updating an absolute snap which is good.

I have some test data that I am now going to try to interrogate/query with. This is probably going to be the point were I break down and start throwing stuff out of fustration.

Who knows, I might even get to play the game sometime soon!


   Report 
   02-24-2006, 2:57 AM
EVL is not online. Last active: 3/28/2007 5:45:53 AM EVL



Top 10 Posts
Joined on 01-30-2006
UK
Posts 83
Re: Database creation advice request.
Reply Quote
If you want me to write a couple of PHP pages to pull data out, I'd be more than happy to.

Fair enough if you don't want - there would be a certain sense of satisfaction with figuring this all out on your own, but just say if you want a hand.


   Report 
   02-24-2006, 5:43 AM
tabitha is not online. Last active: 1/5/2008 9:16:03 AM tabitha



Top 10 Posts
Joined on 01-22-2006
Posts 536
Re: Database creation advice request.
Reply Quote
Thats most appreciated but I am going to fumble about with it for a bit longer first. The thing which I havent gotten around to thinking about yet is how to integrate the php with the existing tables. That I might need a pointer or two on.

Also, what sort of information do we want from the database? I mean one reason I am doing this is to make updating 20 odd scores a 5 minute breeze instead of a 30 minute royal pain in the butt. However one of the features I really loved about versusmode was that it also gave you a total boss time, a total dream total and a total mare total which was very handy to see how you were faring against other people on the site as a whole. I was thinking of something along these lines as well as a function to look at scores for just one player and another to give an average boss time/dream total/mare total as well as a further page for site records.

While Im still doing this via baby steps it might be handt to know if people have any ideas?


   Report 
   02-24-2006, 7:42 AM
EVL is not online. Last active: 3/28/2007 5:45:53 AM EVL



Top 10 Posts
Joined on 01-30-2006
UK
Posts 83
Re: Database creation advice request.
Reply Quote
Yeah, no problem.

I don't quite see what you mean by the totals, but any aggregations will be simple enough.

Also it wouldn't be too tricky to give yourself a page to update peoples scores - it'd probably be more simple than updating the database directly. But then I guess you've got enough on your plate without having to worry about that at the moment. :p



   Report 
   02-28-2006, 11:16 AM
tabitha is not online. Last active: 1/5/2008 9:16:03 AM tabitha



Top 10 Posts
Joined on 01-22-2006
Posts 536
Re: Database creation advice request.
Reply Quote
Ok, I have spent a LONG time on this over the past week but things basically came together tonight. This is a kind of beta page for the scores pages but run by the database rather than updated by html.

https://www.scoreattack.net/tabithaboof/misc/test3.php

- edit - just realised that I broke the database, I m unbreaking it now.

   Report 
   03-01-2006, 3:16 AM
EVL is not online. Last active: 3/28/2007 5:45:53 AM EVL



Top 10 Posts
Joined on 01-30-2006
UK
Posts 83
Re: Database creation advice request.
Reply Quote
Great stuff tabitha, now you've got that page sorted, the others shouldn't me much of a problem at all. :)

But damn, I've got to put a bit of effort into Spring Valley... (I think that's my least favourite level)


   Report 
   03-01-2006, 5:44 AM
tabitha is not online. Last active: 1/5/2008 9:16:03 AM tabitha



Top 10 Posts
Joined on 01-22-2006
Posts 536
Re: Database creation advice request.
Reply Quote
Thanks alot EVL seeing as you know what you are talking about I take that as high praise.

I still have a few little wrinkles to iron out but the leg work is now done.

And give spring valley some time i has hidden depths.


   Report 
   03-02-2006, 8:14 AM
tabitha is not online. Last active: 1/5/2008 9:16:03 AM tabitha



Top 10 Posts
Joined on 01-22-2006
Posts 536
Re: Database creation advice request.
Reply Quote
ok this is my final kink:

https://www.scoreattack.net/tabithaboof/scoresv.php

The database is perfect but when accesing the page is give an error which is related to the security certificate being invalid which I totally dont understand. Anyone have even the vaguest clue what this is about? Its the only thing I need to sort before going live with the php driven site...


   Report 
   03-03-2006, 3:05 AM
EVL is not online. Last active: 3/28/2007 5:45:53 AM EVL



Top 10 Posts
Joined on 01-30-2006
UK
Posts 83
Re: Database creation advice request.
Reply Quote
Oh yeah, I meant to ask you about with the link before...

There's no reason that you need to be using SSL, and turning it off would sort that out.

I'm not sure how you turn it off, but it's probably going to be on directory level. Your control panel that the hosting company supplies should probably allow you to do this.

In fact, you probably want to keep the tabithabooth directory for your php experiments, and move the files out to a scoreboard (or whatever) folder, or even in the root folder, and maybe that will sort it out.

I don't really know a lot about SSL, and must admit I am guessing a bit here, but let me know how you get on. :)


   Report 
   03-03-2006, 12:24 PM
EVL is not online. Last active: 3/28/2007 5:45:53 AM EVL



Top 10 Posts
Joined on 01-30-2006
UK
Posts 83
Re: Database creation advice request.
Reply Quote
By the way, I'm pretty sure that the certificate rubbish is not going to be because your database is on a secure server (the certificates operate on a different level than the script/database stuff)...

Try copying the scoresv.php (for example) file out of the tabithabooth folder and into the root folder for the site to see if http://www.scoreattack.net/scoresv.php gives you the same problem.

Everything in the tabithabooth folder appears to be behind SSL, so I suspect that there is something that is enabling certificates for that whole folder, though I've no idea how you'd turn that off.



   Report 
   03-03-2006, 6:17 PM
tabitha is not online. Last active: 1/5/2008 9:16:03 AM tabitha



Top 10 Posts
Joined on 01-22-2006
Posts 536
Re: Database creation advice request.
Reply Quote
Well the problem is, the tabithaboof folder IS my root directory. I dont really understand what is going on but for example

http://www.scoreattack.net/scoresv.html

and

https://www.scoreattack.net/tabithaboof/scoresv.php

Are acctually in the same folder. I think that my host treats the /tabithaboof directory as the route. I have emailed them, we shall see what they have to say.

Edit - Ok, I THINK I have sorted it out. I dont recall WHY I was looking at I was pointing my browser at httpS and
/TABITHABOOF but pointing directly at http://www.scoreattack.net/scoresv.php seems to work just fine. Aside from the fact that the total dreams page isnt working for some reason everything else appears to be ok?

Thanks for the help EVL by the way. I wouldnt have even thought of that without your help.

   Report 
  Page 1 of 2 (22 items) 1 2 >
Scoreattack.net » Score Attack - ... » www.scoreattack... » Database creation advice request.

Powered by Community Server, by Telligent Systems