Problem with Varchars
PHP Code:
-=[Pingstars]=- - - 951 - 39 - 125 - 1 -=[Pingstars]=- - - 0 - 0 - 0 - 0 mysql entries: steamid name points lives frags STEAM_0:0:16065469 Pingstars * Schwabba 951 39 125 1 BOT [P*D]Bruce_Lee (99) 0 0 0 0 can't get the varchars.. dunno why.. when i change PHP Code:
PHP Code:
|
Re: Problem with Varchars
It would be strange if it worked. After all you are trying to store string in a single variable. Try this:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Why do you send 15 queries to mysql to get the toplist when you could get it with only 1 query? I would code it this way: 1) Load toplist from mysql and store it in memory on plugin_init 2) Load player stats and store them in memory on client_authorized 3) Update toplist stored in memory when player gains points 4) Display toplist stored in memory when player wants to see toplist 5) Save player stats on client_disconnect |
Re: Problem with Varchars
Quote:
Sometimes the simplest things took the most time... Quote:
Quote:
Quote:
I gotta sleep now (looks like i'm not able to code currently) xD |
Re: Problem with Varchars
No you make 1 query in plugin init and retrieve 15 rows at once:
PHP Code:
|
Re: Problem with Varchars
Ah, thank you very much.
I never heared about SQL_NextRow, but it's very useful. |
| All times are GMT -4. The time now is 10:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.