Merge branch '39_Macro_para_el_dato_anterior_data_string' into 'pandora_6.0'
add prevdata modules string See merge request !390
This commit is contained in:
commit
1e640564a6
|
@ -3496,8 +3496,13 @@ sub on_demand_macro($$$$$$) {
|
||||||
return (defined($field_value)) ? $field_value : '';
|
return (defined($field_value)) ? $field_value : '';
|
||||||
} elsif ($macro eq '_prevdata_') {
|
} elsif ($macro eq '_prevdata_') {
|
||||||
return '' unless defined ($module);
|
return '' unless defined ($module);
|
||||||
|
if ($module->{'id_tipo_modulo'} eq 3){
|
||||||
|
my $field_value = get_db_value($dbh, 'SELECT datos FROM tagente_datos_string where id_agente_modulo = ? order by utimestamp desc limit 1 offset 1', $module->{'id_agente_modulo'});
|
||||||
|
}
|
||||||
|
else{
|
||||||
my $field_value = get_db_value($dbh, 'SELECT datos FROM tagente_datos where id_agente_modulo = ? order by utimestamp desc limit 1 offset 1', $module->{'id_agente_modulo'});
|
my $field_value = get_db_value($dbh, 'SELECT datos FROM tagente_datos where id_agente_modulo = ? order by utimestamp desc limit 1 offset 1', $module->{'id_agente_modulo'});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
Loading…
Reference in New Issue