X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=blobdiff_plain;f=web%2FObj%2Fdbase_pgsql.phh;h=feb617ce7ba637ecda2673e5c6214bbe1d340f9b;hp=1baefa3b955d3ced3f877863fd3274fa88a33e27;hb=db12d769481823f4c744ce0e3a50404cc6b01cd1;hpb=9c96c38b48ab376e202045407786dbcf553febb2 diff --git a/web/Obj/dbase_pgsql.phh b/web/Obj/dbase_pgsql.phh index 1baefa3..feb617c 100644 --- a/web/Obj/dbase_pgsql.phh +++ b/web/Obj/dbase_pgsql.phh @@ -633,7 +633,7 @@ class BriskDB $users[$gam_obj->asta_win]['login'] : ""), $gam_obj->friend, ($gam_obj->friend != -1 ? $users[$gam_obj->friend]['login'] : ""), - $gam_obj->pnt, $gam_obj->asta_pnt); + $gam_obj->pnt, $gam_obj->asta_pnt, $gam_obj->tourn_pts); // update matches with new ttok and table idx $mtc_sql = sprintf("UPDATE %sbin5_matches SET (ttok, tidx) = ('%s', %d) WHERE code = %d RETURNING *;", @@ -760,13 +760,14 @@ class BriskDB /* * games management */ - $gam_sql = sprintf("INSERT INTO %sbin5_games (mcode, tstamp, act, asta_pnt, pnt, asta_win, friend, mazzo, mult) - VALUES (%d, to_timestamp(%d), %d, %d, %d, %d, %d, %d, %d) RETURNING *;", + $gam_sql = sprintf("INSERT INTO %sbin5_games (mcode, tstamp, act, asta_pnt, pnt, asta_win, friend, mazzo, mult, tourn_pts) + VALUES (%d, to_timestamp(%d), %d, %d, %d, %d, %d, %d, %d, %d) RETURNING *;", $G_dbpfx, $mtc_obj->code, $date, $action, $table->old_asta_pnt, $table->old_pnt, $table->old_asta_win, $table->old_friend, - $table->old_mazzo, $table->old_mult); + $table->old_mazzo, $table->old_mult, + $table->old_tourn_pts); if (($gam_pg = $this->query($gam_sql)) == FALSE || pg_affected_rows($gam_pg) != 1) { log_crit(sprintf("bin5_points_save: failed at insert game [%s]", $gam_sql)); break;