MySQL R40 - Insert statement not working
#1

I am trying to insert data into the table and these statements work as expected:

Код:
mysql_format(g_SQL, query, sizeof(query), "INSERT INTO `admins` (`pId`, `pName`, `pAdmin`, `aTime`, `aStatus`) VALUES ('%d', '%e', '%d', '%d', 1)", PlayerInfo[id][pId], pName2, level, timestamp);
mysql_tquery(g_SQL, query, "", "");
But when I try to execute this:

Код:
mysql_format(g_SQL, query2, sizeof(query2), "INSERT INTO `bans` (`pId`, `pName`, `bIp`, `bReason`, `bTime`, `pBanned`, `bExpiration`) VALUES ('%d', '%e', '%e', '%e', '%d', 1, 8000)", PlayerInfo[id][pId], pName2, pIp, reason, timestamp);
mysql_tquery(g_SQL, query2, "", "");
Nothing works. If I execute the query using only first columns, then it works perfectly fine. If I execute using only last two, it still works good, but when I execute them together, no data is inserted.

I have checked the database. There is no problem. I am matched the data types.

I am stuck into this weird problem since last three days. Please help.
Reply


Messages In This Thread
MySQL R40 - Insert statement not working - by JaskaranSingh - 30.01.2018, 16:56
Re: MySQL R40 - Insert statement not working - by DelK - 30.01.2018, 17:34
Re: MySQL R40 - Insert statement not working - by Wanheda - 30.01.2018, 17:37
Re: MySQL R40 - Insert statement not working - by JaskaranSingh - 30.01.2018, 17:40
Re: MySQL R40 - Insert statement not working - by Wanheda - 30.01.2018, 17:47
Re: MySQL R40 - Insert statement not working - by JaskaranSingh - 30.01.2018, 17:54
Re: MySQL R40 - Insert statement not working - by JaskaranSingh - 30.01.2018, 17:56

Forum Jump:


Users browsing this thread: 1 Guest(s)