- $gam_sql = sprintf("INSERT INTO %sbin5_games (mcode, tstamp)
- VALUES (%d, to_timestamp(%d)) RETURNING *;",
- $G_dbpfx, $mtc_obj->code, $date);
- if ( ! (($gam_pg = $this->query($gam_sql)) != FALSE &&
- pg_affected_rows($gam_pg) == 1) ) {
+ $gam_sql = sprintf("INSERT INTO %sbin5_games (mcode, tstamp, asta_pnt, pnt, asta_win, friend, mazzo, mult)
+ VALUES (%d, to_timestamp(%d), %d, %d, %d, %d, %d, %d) RETURNING *;",
+ $G_dbpfx, $mtc_obj->code, $date,
+ ($table->old_asta_win == -1 ? -1 : $ucodes[$table->old_asta_win]),
+ ($table->old_friend == -1 ? -1 : $ucodes[$table->old_friend]),
+ $table->old_asta_pnt, $table->old_mult, $table->old_pnt);
+ if (($gam_pg = $this->query($gam_sql)) == FALSE || pg_affected_rows($gam_pg) != 1) {