From 25318fb013a332cf29994784b4631bcaa00e525a Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Fri, 20 Dec 2019 11:09:25 +0100 Subject: #948 Fix entity (Entidad) creation Pepe Frias reports that the creation of a new entity does not work. The WebConsole throws this error: 004 : Comando Error - La sentencia SQL del comando no es correcta. The WebConsole treats the parameter $ogunit as a string but the Database treats $ogunit as a tinyint. So, when the WebConsole tries to do the query the Database throws an error code: 1366. Error number: 1366; Symbol: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD; SQLSTATE: HY000 Message: Incorrect %s value: '%s' for column '%s' at row %ld This commit changes the behaviour of gestor_entidades.php to treat ogunit as an integer. --- admin/WebConsole/gestores/gestor_entidades.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'admin/WebConsole/gestores') diff --git a/admin/WebConsole/gestores/gestor_entidades.php b/admin/WebConsole/gestores/gestor_entidades.php index 7c89d30b..3afe104a 100644 --- a/admin/WebConsole/gestores/gestor_entidades.php +++ b/admin/WebConsole/gestores/gestor_entidades.php @@ -119,7 +119,7 @@ function Gestiona(){ $cmd->CreaParametro("@identidad",$identidad,1); $cmd->CreaParametro("@nombreentidad",$nombreentidad,0); $cmd->CreaParametro("@comentarios",$comentarios,0); - $cmd->CreaParametro("@ogunit",$ogunit,0); + $cmd->CreaParametro("@ogunit",$ogunit,1); switch($opcion){ case $op_alta : -- cgit v1.2.3-18-g5258