AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Converting nVault to Mysql (https://forums.alliedmods.net/showthread.php?t=326070)

Shadows Adi 07-17-2020 06:59

Converting nVault to Mysql
 
Hello,

If I have a plugin that is saving data in nvault format, can I make a separate plugin that takes the data from nvault from the other plugin and puts it in a mysql database and from there a site takes the data to display it?

A firend asks to write this for him. :)

Bugsy 07-17-2020 08:26

Re: Converting nVault to Mysql
 
Yes, you would use nvault utility to read all data from the vault and write to the database tables

Shadows Adi 07-17-2020 08:32

Re: Converting nVault to Mysql
 
Thanks for answer.

Rohanlogs 07-17-2020 16:52

Re: Converting nVault to Mysql
 
Quote:

Originally Posted by Bugsy (Post 2710466)
Yes, you would use nvault utility to read all data from the vault and write to the database tables

How about the queries if there are many entries? Like thousands?
If you loop through all of the nvault data and execute a query on every loop I'm pretty sure the server will crash.
I'm not aware of any mass query transaction func in amxx, sourcemod has it.
You could try stacked queries but idk if amxx can handle it.

However before any sweaty searching I could help you doing something like saving all the data in a .txt file and use Python to query them into the database.

Shadows Adi 07-17-2020 17:29

Re: Converting nVault to Mysql
 
My friend has a plugin that stores the data in nvault (he doesn't have the source code) he wants a plugin that takes the data from nvault of the other plugin and uploads them in a database, where they can be displayed on a website

Bugsy 07-17-2020 21:57

Re: Converting nVault to Mysql
 
I would recommend converting the plugin to use a database instead of nVault. This will be more efficient than using nvault and transferring data to the database to be consumed by the website.


All times are GMT -4. The time now is 13:50.

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