SA-MP Forums Archive
adding more tables mysql - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: adding more tables mysql (/showthread.php?tid=647738)



adding more tables mysql - MrCesar - 10.01.2018

hey, i've started using mysql and i followed this tutorial:

http://forum.sa-mp.com/showthread.ph...egister+system

and i don't really understand how i can add more tables like admin level, vip level, position, weapons all of it upon saving besides everything it has.

thanks in advance!


Re: adding more tables mysql - Hypex - 10.01.2018

You basically have to do the same thing the creator did find "score" for example and do the same thing.Warning if you want to save the position you'll have to make it a float.
Although the easiest MySQL saving system I've used is https://sampforum.blast.hk/showthread.php?tid=606930
everything is straight forward with this and well organized.


Re: adding more tables mysql - iLearner - 10.01.2018

What you want to add is column I suppose? simply run this command in phpmyadmin (if you have):
PHP код:
ALTER TABLE <table_nameADD column_name type null/notnull/AUTO_INCREMENT



Re: adding more tables mysql - MrCesar - 10.01.2018

oh so i can just add the tables at the database and pull them into the game by the script?with pinfo?


Re: adding more tables mysql - denNorske - 10.01.2018

Well somewhat like that.

You go into the database, add the table you want (or columns you need for new fields)
Then, make the columns or table load into the script and assign the values you load into variables (for instance)
And use the information like that.

This is done the same way as in the system you linked:


The same method to save the data too as in the tutorial, you need to update the data in the fields. (UPDATE table SET ...)


Re: adding more tables mysql - MrCesar - 10.01.2018

Quote:
Originally Posted by denNorske
Посмотреть сообщение
Well somewhat like that.

You go into the database, add the table you want (or columns you need for new fields)
Then, make the columns or table load into the script and assign the values you load into variables (for instance)
And use the information like that.

This is done the same way as in the system you linked:


The same method to save the data too as in the tutorial, you need to update the data in the fields. (UPDATE table SET ...)
thanks that helped me out alot