23.05.2018, 18:16
Why this query is not inserting?
table
playerid = playerid
datestr
killers
...for:
after for
PHP код:
mysql_format(ConnectMYSQL, query, sizeof(query), "INSERT INTO `mt` (`player`, `killers`, `date`) VALUES ('%d', '%s', '%s')", playerid, strkillers, datestr);
mysql_query(ConnectMYSQL,query);
Код:
player int(11) killers text date varchar(20)
datestr
Код:
new datestr[128]; new Year, Month, Day; getdate(Year, Month, Day); format(datestr, sizeof(datestr), "%02d/%02d/%d", Day, Month, Year );
...for:
Код:
new kstr[128]; if(killerid != INVALID_PLAYER_ID) { printf("OI"); format(kstr, sizeof(kstr), "<a href='player.php?p=%s'>%s</a> ", PlayerName(killerid), PlayerName(killerid) ); printf("kstr: ", kstr); }
Код:
strcat(strkillers, kstr);