Saving Guns MYsql
#1

Can i save Guns player data using MYSQL like This

pawn Код:
for(new s = 0; s < 12; s++)
    {
        format(Query, sizeof(Query), "INSERT INTO playerdata (Gun%d) VALUES(0)")
        mysql_query(Query);
    }
I tried like that code.
But it has no efect on data.

Anyone can help?
Reply
#2

for(new s = 0; s < 12; s++) {
format(Query, sizeof(Query), "INSERT INTO playerdata (Gun%d) VALUES (0);", s)
mysql_query(Query);
}

Not very recommended though.
Reply
#3

Is that VALUES of guns data can make 12 data guns variables?
Reply
#4

If I'm correct you're trying to save the players weapons they have on them at that current point? If so you'll have to workout how many guns they have and GetPlayerWeapons then save them.
Reply
#5

If you already have the columns created, it will make 12 rows and each will have the value 0 on different columns.
Reply
#6

Okay..
I'll try that.

Why it's not recommended?
Reply
#7

MySQL is not very efficient if you have little knowledge for it.
Reply
#8

But MYSQL had strong Database.
Isn't it?

If there's another better than MYSQL..
What is it?
Reply
#9

SQLite.

https://sampwiki.blast.hk/wiki/Db_open
https://sampwiki.blast.hk/wiki/Db_close
https://sampwiki.blast.hk/wiki/Db_query
https://sampwiki.blast.hk/wiki/Db_free_result
Reply
#10

How to make This multiple TABLES to one TABLES MYSQL..?

http://pastebin.com/r2kvHZDx

It's just make One TABLES just make TABLES on line first mysql_query...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)