AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [INC] SQLVault (https://forums.alliedmods.net/showthread.php?t=146849)

PsYChOPaTiQuE 01-31-2011 12:28

Re: [INC] SQLVault
 
I have this errors:

http://img64.xooimage.com/files/6/1/9/1-2516c83.png

Arkshine 01-31-2011 12:30

Re: [INC] SQLVault
 
It seems your .inc are outdated. Update them with the latest amxx version.

PsYChOPaTiQuE 01-31-2011 13:47

Re: [INC] SQLVault
 
It works !
Thank you

t3hNox 01-31-2011 14:26

Re: [INC] SQLVault
 
I'm currently using the default nvault to save data for my mod. The problem is that I believe loading and saving data to nvault cause very noticeable performance issues such as high CPU usage time to time, screen freezes to players and as a result lags too. I guess it is because of that loading and saving take place very often (on client connect/disconnect which _is_ very often) and there are made a lot of new nvault entries every day.

So I wanted to ask if converting saving, loading methods and generally all this data storage from nvault to SQLite (using this include) would improve the server's performance ?

GordonFreeman (RU) 02-07-2011 05:44

Re: [INC] SQLVault
 
Wow! At last, it was easy to work with SQLite.
Thanks!

Doc-Holiday 08-23-2011 14:54

Re: [INC] SQLVault
 
Well let me set up for my question.

My test server is a windows machine sitting next to me.. It was added to my remoteMySql access list back when Drekes released his Watchlist. My battlefield plugin Remote SQL works fine for this server.

My hosted server is a linux machine hosted by gameservers. It was added to my remoteMySql access list last night and the plugin cannot open the database file..

Both configs and .amxx plugins are identical.. Any reason for it not to work? or ideas on how to fix it?

Just so there is no confusion.. The host name is not local host.. and the DB is hosted at xvgaming.com through siteground.






im just gonna asume you have no idea why my linux server cant connect to the db when my windows machine does just fine??

GRRR!!!! lol..

nikhilgupta345 09-19-2011 18:48

Re: [INC] SQLVault
 
Been using this for a lot of my plugins.

Great work.

Tirant 09-21-2011 14:41

Re: [INC] SQLVault
 
I'm trying to make a ranking system, but sorting the array is becoming a problem. I'm saving the exp and name of the users in the database, and using their steamids to access the information. My problem is, although I can create a sorting function, it includes the names of the users in the sort, when I do not want that. If I prune the names from the vault and do the sorting function, then when I need to get their names, I can no longer do so.

My question is: is it possible to somehow omit certain keys, or only have a certain key in a read_all_ex function?

nikhilgupta345 09-21-2011 17:06

Re: [INC] SQLVault
 
Quote:

Originally Posted by Tirant (Post 1560356)
I'm trying to make a ranking system, but sorting the array is becoming a problem. I'm saving the exp and name of the users in the database, and using their steamids to access the information. My problem is, although I can create a sorting function, it includes the names of the users in the sort, when I do not want that. If I prune the names from the vault and do the sorting function, then when I need to get their names, I can no longer do so.

My question is: is it possible to somehow omit certain keys, or only have a certain key in a read_all_ex function?

Just don't use the key :O

aData[ SQLVEx_Key1 ]

or

aData[ SQLEx_Key2 ]

Don't think you are required to use them.

Tirant 09-21-2011 23:22

Re: [INC] SQLVault
 
Quote:

Originally Posted by nikhilgupta345 (Post 1560429)
Just don't use the key :O

aData[ SQLVEx_Key1 ]

or

aData[ SQLEx_Key2 ]

Don't think you are required to use them.

read_all returns an an entire array of all entries, and even though both key1's are the same, there are 2 entries for each key2's. I found a solution though that seems to be working. I basically sort the array like I did, but sort the parts other than exp last.

I know that MySql has some ranking built into it, but something like I mentioned would be really helpful I think. So you could use a more specific real_all_ex and it would only return key2's matching the one entered.


All times are GMT -4. The time now is 15:30.

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