serial monitor showing weird characters when i put 2 raw code in one sketch

hi, i have a project to control ac and tv power with IR signal from internet and i have arduino mega and uno.
in this case i use mysql connector for getting condition and applying IR command, so if in db value is TvPower command will be send IR signal with Tv power code or if value is AcPower then will send ir signal with Ac Power raw code.
but if i put 2 code raw in one time, code is crash and just showing unreadeble characters.
this is my code

#include <Ethernet.h>
#include <MySQL_Connection.h>
#include <Dns.h>
#include <MySQL_Cursor.h>
#include <IRremote.h>
IRsend irsend;

//this is the problem
#define RAW_DATA_LEN 68
uint16_t rawTvPower[RAW_DATA_LEN]={
  4510, 4498, 558, 1682, 554, 1682, 554, 1682, 
  558, 566, 554, 566, 554, 566, 550, 566, 
  554, 566, 554, 1682, 554, 1686, 554, 1682, 
  554, 566, 554, 566, 554, 566, 554, 566, 
  554, 566, 550, 566, 554, 1682, 558, 566, 
  554, 566, 550, 566, 554, 566, 554, 566, 
  554, 566, 554, 1682, 554, 566, 554, 1682, 
  554, 1682, 558, 1682, 554, 1682, 558, 1682, 
  554, 1682, 554, 1000};
/*if i add more raw code like this, serial monitor is broke and not showing nothing or just weird characters (mysql connector also cant start)
*/
uint16_t rawAcPower[RAW_DATA_LEN]={
  4470, 4538, 490, 1750, 490, 1746, 490, 1750, 
  490, 630, 490, 626, 494, 626, 490, 630, 
  490, 630, 490, 1746, 490, 1750, 542, 1694, 
  494, 626, 490, 630, 490, 630, 490, 630, 
  490, 630, 490, 1746, 490, 1750, 494, 1742, 
  490, 1750, 542, 578, 542, 578, 490, 630, 
  542, 574, 494, 626, 490, 630, 546, 574, 
  490, 630, 490, 1750, 542, 1694, 546, 1694, 
  490, 1746, 490, 1000};

  
byte mac_addr[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
char hostname[] = "******";
char user[] = "*******";
char password[] = "*******";
char query[] = "SELECT * FROM ****** where user='trial'";
char INSERT_SQL[] = "UPDATE ****** SET value ='%s' WHERE user ='%s'";
char queryInsert[128];
EthernetClient client;
IPAddress server_ip;
MySQL_Connection conn((Client *)&client);
DNSClient dns_client;
MySQL_Cursor cur = MySQL_Cursor(&conn);
void setup() { 
  Serial.begin(115200);  
  while (!Serial);
  Ethernet.begin(mac_addr);
  // Begin DNS lookup
  dns_client.begin(Ethernet.dnsServerIP());
  dns_client.getHostByName(hostname, server_ip);
  Serial.println(server_ip);
  // End DNS lookup
  Serial.println("Connecting...");
  if (conn.connect(server_ip, 3306, user, password)) {
  Serial.println("CONNECTED!");
  }
  else
    Serial.println("Connection failed.");
}
void loop() {
  MySQL_Cursor *cur_mem = new MySQL_Cursor(&conn);
  MySQL_Cursor *cur_insert = new MySQL_Cursor(&conn);
  sprintf(queryInsert, INSERT_SQL, "NO","****");
  cur_mem->execute(query);
  column_names *cols = cur_mem->get_columns();
  row_values *row;
while(row = cur_mem->get_next_row())
{
        String rawValue=row->values[3];
        String catIR=row->values[2];
        Serial.println("\nraw value = ");
        Serial.println(rawValue);
        if(rawValue=="TvPower")
        {
  irsend.sendRaw(rawTvPower, RAW_DATA_LEN, 38); //send raw data at 38KHz frequency
  cur_insert->execute(queryInsert);
  Serial.println("Recording data!");
  delete cur_insert;
    }else if(rawValue=="AcPower")
        {
          irsend.sendRaw(rawAcPower, RAW_DATA_LEN, 38); //send raw data at 38KHz frequency
          cur_insert->execute(queryInsert);
          Serial.println("Recording data!");
          delete cur_insert;
        }
}
  delete cur_mem;
}

in serial monitor just printing :
x⸮⸮x

'=' versus '==' in below while

while (row = cur_mem->get_next_row())

In the same while block, there is a chance that you delete cur_insert but go through the while-loop again at a next iteration; nearly guaranteed to be the cause of strange behaviour. A solution might be to break from the while-loop after the delete statement.

sorry i cant understand correctly, can you give me some simple example?

What don't you understand? '=' vs '==' or my comment about the delete?

everything, try change my code pls, and maybe i will be understand

'=' is an assignment operator while '==' is for comparison

while (row = cur_mem->get_next_row())

Replace '=' by '=='.

After delete cur_insert;, add a break;

      delete cur_insert;
      break;

It's probably also a good idea to set cur_insert to an invalid value that you can test

      delete cur_insert;
      cur_insert = NULL;
      break;

And at the end of loop() change

  delete cur_mem;
}

to

  delete cur_mem;
  if(cur_insert != NULL)
  {
    delete cur_insert;
  }
}

Lastly, if you use dynamic memory allocation as done below

  MySQL_Cursor *cur_mem = new MySQL_Cursor(&conn);
  MySQL_Cursor *cur_insert = new MySQL_Cursor(&conn);

it's advisable to check if it succeeded.

  MySQL_Cursor *cur_mem = new MySQL_Cursor(&conn);
  if (cur_mem == NULL)
  {
    // inform user
    Serial.println("Error allocating memory for cur_mem");
    // done
    return;
  }

  MySQL_Cursor *cur_insert = new MySQL_Cursor(&conn);
  if (cur_insert == NULL)
  {
    // inform user
    Serial.println("Error allocating memory for cur_insert");

    // cleanup cur_mem
    delete cur_mem;

    // done
    return;
  }

Note:
no experience with the MySql library.

if i use == in this case, compiling is cant run or fail.