Mysql Questions
#1

Hey guys, these questions might make some of you laugh, but w.e idc, i could use some help understanding mysql more.

Alright say im going to use enums for the system, for example:

pawn Код:
enum pInfo
{
pUsername,
pSQLid,
pPassword
}
new PlayerInfo[MAX_PLAYERS][pInfo];
How would i correctly make a database for this? I know i use VARCHAR for username and password, and i set them at 24 value. But how do i know what to set the pSQLid to, the house keys, the items, etc to.

If someone could explain this, and use my example of psqlid, i would be forever grateful, lol, yeah i sound corny oh well.

some other enums you could use to explain, could be pFaction, then maybe floats, for locations. Thanks in advance.
Reply
#2

Quote:
Originally Posted by Anthonyx3'
Посмотреть сообщение
Hey guys, these questions might make some of you laugh, but w.e idc, i could use some help understanding mysql more.

Alright say im going to use enums for the system, for example:

pawn Код:
enum pInfo
{
pUsername,
pSQLid,
pPassword
}
new PlayerInfo[MAX_PLAYERS][pInfo];
How would i correctly make a database for this? I know i use VARCHAR for username and password, and i set them at 24 value. But how do i know what to set the pSQLid to, the house keys, the items, etc to.

If someone could explain this, and use my example of psqlid, i would be forever grateful, lol, yeah i sound corny oh well.

some other enums you could use to explain, could be pFaction, then maybe floats, for locations. Thanks in advance.
pawn Код:
enum pInfo
{
    pUsername[24],
    pSQLid,
    pPassword[128],
    Float:pPos[4],
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Will work. PSQLid has to be null auto-increment and Number. Use FLOAT for pPos. Click.
Reply
#3

Yeah, but im trying to add to databasse i just know how to correctly insert, like idk if i pick int, varchar, etc.
Reply
#4

Quote:
Originally Posted by Anthonyx3'
Посмотреть сообщение
Yeah, but im trying to add to databasse i just know how to correctly insert, like idk if i pick int, varchar, etc.
Check this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)