From a4ef7051b7958c87657d5a14b90c0fce294f84cb Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Thu, 6 Mar 2008 09:35:47 +0000 Subject: [PATCH] Concurrent edition fix --- includes/systypes.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/systypes.inc b/includes/systypes.inc index e9aa6987..3d459810 100644 --- a/includes/systypes.inc +++ b/includes/systypes.inc @@ -14,7 +14,8 @@ Function get_next_trans_no ($trans_type){ $next_number = $myrow[0] + 1; - $sql = "UPDATE ".TB_PREF."sys_types SET type_no = $next_number WHERE type_id = $trans_type"; + $sql = "UPDATE ".TB_PREF."sys_types SET type_no = $next_number WHERE type_id = $trans_type + AND type_no = ". $myrow[0]; //concurrency paranoic protection db_query($sql,"The next transaction number for $trans_type could not be updated"); -- 2.30.2