27.07.2018, 14:50
FIRST: which of these two variants is better and better to avoid the occurrence of errors?
1:
OR
2:
I want to choose between these two variants to store ids from dialogs.
SECOND:
if I use the mysql_escape_string function at the beginning it will work, I do not want to put it every time I put something in the database, and I do not even want to change all the mysq_format add-on% e, there are too many.
PS: i used ******Translate.
1:
PHP код:
enum {
DIALOG_REGISTER,
DIALOG_LOGIN,
DIALOG_SELECT,
...
};
2:
PHP код:
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SELECT 3
...
SECOND:
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(IsPlayerConnected(playerid))
{
new sendername[MAX_PLAYER_NAME], string[1500];
mysql_escape_string(inputtext, inputtext, MAX_STRING);
//--------------------------------------------------------
PS: i used ******Translate.