adding more tables mysql
#1

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!
Reply
#2

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.
Reply
#3

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
Reply
#4

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

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 ...)
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)