So I'm having a problem inserting specific data in to a MySQL database.
Here's some of the code:
PHP Code:
new String:g_sReporterName[MAXPLAYERS +1][MAX_NAME_LENGTH];
new String:g_sReporterAuth[MAXPLAYERS +1][24];
new String:g_sReporteeName[MAXPLAYERS +1][MAX_NAME_LENGTH];
new String:g_sReporteeAuth[MAXPLAYERS +1][24];
new String:g_sReason[MAXPLAYERS +1][256];
new String:g_sServer[MAXPLAYERS +1][256];
then when a player selects a menu option it does this which works fine:
PHP Code:
GetClientName(client,g_sReporterName[client],sizeof(g_sReporterName[]));
GetClientAuthString(client,g_sReporterAuth[client],sizeof(g_sReporterAuth[]));
GetClientName(client,g_sReporteeName[client],sizeof(g_sReporteeName[]));
GetClientAuthString(client,g_sReporteeAuth[client],sizeof(g_sReporteeAuth[]));
GetClientName(0,g_sServer[client],sizeof(g_sServer[]));
and here's where things get messed up. This is in the next menu confirming a report and it tries to insert the info into the database:
PHP Code:
new String:Query[256];
Format(Query,sizeof(Query),"INSERT INTO plugin (reportername,reporterauth,reporteename,reporteeauth,reason,server) VALUES ('%s','%s','%s','%s','%s','%s')",g_sReporterName[client],g_sReporterAuth[client],g_sReporteeName[client],g_sReporteeAuth[client],g_sReason[client],g_sServer[client]);
SQL_FastQuery(Database,Query);
Now I've checked and the strings have all the correct values, but for some reason it isn't input into the database.
I've tried without the strings and it inserts the data into the database fine, so something has to be wrong there with the strings.
Any ideas?