gvHidraForm_DB_operar.patch
include/gvh_patterns/gvHidraForm_DB.php (working copy) | ||
---|---|---|
1023 | 1023 |
* Es la funcin que el programador debe gastar para realizar una operacin SQL |
1024 | 1024 |
* |
1025 | 1025 |
* @param string que contiene la operacin a realizar. |
1026 |
* @return integer devuelve 0 si todo ha ido bien o -1 en caso de error
|
|
1026 |
* @return integer devuelve el nmero de filas afectadas si todo ha ido bien o -1 en caso de error
|
|
1027 | 1027 |
*/ |
1028 | 1028 |
public function operar($str_operacion){ |
1029 | 1029 |
if(!isset($this->obj_errorNegocio)){ |
... | ... | |
1031 | 1031 |
$g_error = new IgepError(); |
1032 | 1032 |
$this->obj_errorNegocio = & $g_error; |
1033 | 1033 |
} |
1034 |
$this->obj_conexion->operar($str_operacion); |
|
1034 |
$res = $this->obj_conexion->operar($str_operacion);
|
|
1035 | 1035 |
if($this->obj_errorNegocio->hayError()){ |
1036 | 1036 |
//La consulta es erronea. |
1037 | 1037 |
$this->obj_errorNegocio->setMsjError($this->obj_mensaje =new IgepMensaje()); |
1038 | 1038 |
return -1; |
1039 | 1039 |
} |
1040 |
return 0;
|
|
1040 |
return $res;
|
|
1041 | 1041 |
} |
1042 | 1042 | |
1043 | 1043 |
/** |