foreach($array_game as $value) {
$params = [
'where' => [
'g_id' => $value['g_id'],
],
'table' => 'games',
];
if(empty($this->getInfo_mysql($params))) {
unset($params);
$params = [
'g_id' => $value['g_id'],
'g_time' => $value['g_time'],
'g_result' => $value['g_result'],
];
$this->insertGame_mysql($params);
unset($params);
}
}