The Daily Click ::. Forums ::. Klik Coding Help ::. Internet highscores w/ Vitalize 4
 

Post Reply  Post Oekaki 
 

Posted By Message

MJK

Possibly Insane

Registered
  22/03/2006
Points
  3592

Game Of The Week Cup 1Game Of The Week Cup 2Game Of The Week Cup 3Game Of The Week Cup 4Game Of The Week Cup 5Game Of The Week Cup 6
21st January, 2008 at 08:15:36 -

"I'd like to know how to just show 1 up though."

Jason, you can try to limit the while() loop in the php file to
while ($loopindex = 1)


Then the loop should stop listing the scores after it has exceeded the row no. 1 in your sql database.

 
n/a

Jason Orme

Using Klik Products Since 1998

Registered
  24/05/2002
Points
  960

VIP Member360 OwnerWii OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimeI'm a Storm TrooperI'm on a BoatIt's-a me, Mario!
Sonic SpeedMushroomStrawberryI like Aliens!PS3 OwnerTurtle Power!I am an April Fool
21st January, 2008 at 08:21:06 -

How could I just show 1 in game?

 
www.jsofts.com

MJK

Possibly Insane

Registered
  22/03/2006
Points
  3592

Game Of The Week Cup 1Game Of The Week Cup 2Game Of The Week Cup 3Game Of The Week Cup 4Game Of The Week Cup 5Game Of The Week Cup 6
21st January, 2008 at 11:39:14 -

In your highscore board frame:

Start loop "displayscores" 1 times

That should show only the highest score. But it still has the same loading time because it reads more rows than just one. If you want to reduce the loading time (so that only the highest score is loaded), edit the returnscores.php to something like this:

while ($loopindex = 1)
(or 2)

 
n/a

Jason Orme

Using Klik Products Since 1998

Registered
  24/05/2002
Points
  960

VIP Member360 OwnerWii OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimeI'm a Storm TrooperI'm on a BoatIt's-a me, Mario!
Sonic SpeedMushroomStrawberryI like Aliens!PS3 OwnerTurtle Power!I am an April Fool
21st January, 2008 at 12:26:01 -

fantastic, thanks.

 
www.jsofts.com

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
21st January, 2008 at 12:35:06 -

Flava's pretty good with that online high score stuff too; might try tossing him a few questions.

 
Craps, I'm an old man!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
21st January, 2008 at 16:55:35 -


Originally Posted by Edwin Street
MySQL (whatever that is)


Database system.

 
Old member (~2004-2007).

eyeangle



Registered
  12/06/2003
Points
  1683
21st January, 2008 at 18:56:21 -

Thanks DaVince.

I've uploaded the two files the tutorial talks about to my sitesled page using MySQL from freemysql.net. And they come up like this:
http://eyeangle.sitesled.com/displayscores.php
http://eyeangle.sitesled.com/submitscore.php

But when I used byethost and its MySQL it came out like this:
http://eyeangle.byethost13.com/displayscores.php
http://eyeangle.byethost13.com/submitscore.php

Which is great and all but byethost doesn't support things coming in from games so that's no use.

Why don't the first two links work? They're exactly the same file, just different MySQL host.

Image Edited by the Author.

 
theonecardgame.com

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
21st January, 2008 at 19:07:53 -

PHP pages are run server-sided, and Sitesled does not provide the PHP service. That's why PHP pages won't work on Sitesled.

Byethost SHOULD be able to fetch your game's data and put it into the database... after all, once you logged into the MySQL database correctly you can fetch and insert any data into the database you like. Well, if your roles are set up correctly, anyway.

Image Edited by the Author.

 
Old member (~2004-2007).

eyeangle



Registered
  12/06/2003
Points
  1683
21st January, 2008 at 21:38:36 -

I've looked around the freemysql.net site and can't find anywhere to upload the displayscores.php and submitscore.php files. Is it possible to upload them to another php server and have it link back to the database and freemysql.net?

 
theonecardgame.com

eyeangle



Registered
  12/06/2003
Points
  1683
21st January, 2008 at 21:39:02 -

I've looked around the freemysql.net site and can't find anywhere to upload the displayscores.php and submitscore.php files. Is it possible to upload them to another php server and have it link back to the database and freemysql.net?

If so, what's a good php server to upload them to?

 
theonecardgame.com

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
22nd January, 2008 at 12:46:37 -

http://www.0php.com/free_PHP_hosting.php

First result on Google.

 
Old member (~2004-2007).
   

Post Reply



 



Advertisement

Worth A Click