[MySQL] What is happening?
#1

Hi,

I have some code which has worked perfectly fine.. and all of a sudden it has just stopped working and just gives out blank results..

code
Код:
public OnPlayerCharacterSelection(playerid) {
   #if TESTSERVER == true
      print("OnPlayerCharacterSelection Called.");
   #endif
   MySQL::getData(rows, fields);
   printf("Rows: %i", rows);
   for(new i = 0; i < rows; i++) {
      MySQL::storeString(i, 1, Temp[i][0]);
      if(strfind(Temp[i], "null", true) != -1) strcat((Temp[i][0] = EOS, Temp[i]), "Create Character", 17);
   }
   format(str, sizeof(str), "%s\n%s\n%s", Temp[0], Temp[1], Temp[2]);
   ShowPlayerDialog(playerid, DIALOG_ACCOUNT, DIALOG_STYLE_LIST, ""SVR_NAME" - Account", str, DIALOG_BUTTON_SELECT, DIALOG_BUTTON_EXIT);
}
mysql_log.txt
Код:
[16:43:08] [DEBUG] mysql_format - connection: 1, len: 450, format: "SELECT Username FROM playerdata WHERE ID IN(%i, %i, %i) ORDER BY ID ASC"
[16:43:08] [DEBUG] mysql_tquery - connection: 1, query: "SELECT Username FROM playerdata WHERE ID IN(1, 2, 0) ORDER BY ID", callback: "OnPlayerCharacterSelection", format: "i"
[16:43:08] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[16:43:08] [DEBUG] CMySQLQuery::Execute[OnPlayerCharacterSelection] - starting query execution
[16:43:08] [DEBUG] CMySQLQuery::Execute[OnPlayerCharacterSelection] - query was successfully executed within 3.37 milliseconds
[16:43:08] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[16:43:08] [DEBUG] Calling callback "OnPlayerCharacterSelection"..
[16:43:08] [DEBUG] cache_get_data - connection: 1
[16:43:08] [DEBUG] cache_get_row - row: 0, field_idx: 1, connection: 1, max_len: 1
[16:43:08] [WARNING] CMySQLResult::GetRowData - invalid row ('0') or field index ('1')
[16:43:08] [DEBUG] cache_get_row - row: 1, field_idx: 1, connection: 1, max_len: 1
[16:43:08] [WARNING] CMySQLResult::GetRowData - invalid row ('1') or field index ('1')
It is supposed to display the users characters that they have stored between two different tables, I have checked the code and the database and I have debugged the server with print, the print shows that there are 2 rows, which is correct however in the mysql log, says that there are no rows or fields.. which isn't right..

I'm clearly not smart enough to figure this out.. or just haven't looked hard enough so could someone point out what is happening?
Reply


Messages In This Thread
[MySQL] What is happening? - by MotherDucker - 13.06.2016, 16:34
Re: [MySQL] What is happening? - by Konstantinos - 13.06.2016, 17:35
Re: [MySQL] What is happening? - by MotherDucker - 13.06.2016, 18:22
Re: [MySQL] What is happening? - by Konstantinos - 13.06.2016, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)