Raised This Month: $ Target: $400
 0% 

Place from MySQL


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 10-15-2011 , 16:20   Place from MySQL
Reply With Quote #1

Hey, how to get place from MySql without having to wait, so the result will be retrieved instantly, I need to get place and total num of players from table.

need to get place ordered by kills, so the output would be:

"Your %d of %d", YourRankPlace, TotalRankPlaces)

How to do it with Tries or something, so I can refresh a Places everytime the kills is changed.
reinert is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 10-15-2011 , 17:08   Re: Place from MySQL
Reply With Quote #2

Maybe this could help you:
http://forums.alliedmods.net/showthread.php?t=166106
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
reinert
Veteran Member
Join Date: Feb 2007
Old 10-15-2011 , 17:26   Re: Place from MySQL
Reply With Quote #3

well it didn't help me, because I need to get player place from table instantly, without waiting 2-3seconds until server calculates it.
reinert is offline
FoxueR
Senior Member
Join Date: Jun 2011
Old 10-15-2011 , 18:19   Re: Place from MySQL
Reply With Quote #4

This tutorial explains how to do SQL queries and fetch results atomically using SQLx:
http://forums.alliedmods.net/showthread.php?t=46779
__________________
¯\_(ツ)_/¯
FoxueR is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 10-15-2011 , 18:40   Re: Place from MySQL
Reply With Quote #5

Even though this isn't clearly a solution to your problem, I'd suggest printing a message like "loading..." in the chat. Not only that threaded queries are a better solution, it also looks more modern with this method and "well done" for players.
Backstabnoob is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-15-2011 , 18:42   Re: Place from MySQL
Reply With Quote #6

Already solved out, hleV helped me, done it with TrieCell
reinert is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode