Can I make it shorter - MySQL
#2

Yes if you have default values such as 0, there is no need to set it while registering a new row.
Default values can be set when you are creating a column in a MySQL table, either by code or manually.

For example:
You have default values of `Admin`, `VIP` etc. as 0. So your query can be:
pawn Код:
mysql_format(mysql, query, sizeof(query), "INSERT INTO `players` (`Username`, `Password`, `IP`) VALUES ('%e', '%s', '%s')", Name[playerid], pInfo[playerid][Password], IP[playerid]);
Reply


Messages In This Thread
Can I make it shorter - MySQL - by NeXoR - 24.04.2016, 00:58
Re: Can I make it shorter - MySQL - by Gammix - 24.04.2016, 01:29
Re: Can I make it shorter - MySQL - by NeXoR - 24.04.2016, 01:44
Re: Can I make it shorter - MySQL - by Gammix - 24.04.2016, 01:47
Re: Can I make it shorter - MySQL - by NeXoR - 24.04.2016, 02:01
Re: Can I make it shorter - MySQL - by NeXoR - 24.04.2016, 02:12
Re: Can I make it shorter - MySQL - by Gammix - 24.04.2016, 02:23
Re: Can I make it shorter - MySQL - by Lordzy - 24.04.2016, 03:42
Re: Can I make it shorter - MySQL - by Lordzy - 24.04.2016, 15:03
Re: Can I make it shorter - MySQL - by NeXoR - 24.04.2016, 15:34

Forum Jump:


Users browsing this thread: 3 Guest(s)