In one of my classes I have this proc:
function _cm_initialise ($where, $selection){
if ($GLOBALS['mode'] == 'search' || $GLOBALS['mode'] == 'list') {
require_once 'classes/entidad.class.inc';
$entidad = new entidad;
$entidad->sql_select = 'entidad_id';
$entidad_id = $entidad->getData("entidad_id='" .$_SESSION['role_id'] ."'");
if ($entidad->numrows == 1){
if (empty($where)){
$where = "participante_id IN (SELECT participante_id FROM part_ent_xref WHERE entidad_id=" .$entidad_id[0]['entidad_id'] . ")";
}else{
$where .= "AND participante_id IN (SELECT participante_id FROM part_ent_xref WHERE entidad_id=" .$entidad_id[0]['entidad_id'] . ")";
}
}
}
return $where;
}
The problem I have with it, is that when I hit the read button of a list1 transacation, even though nothing is selected it opens all the records instead of showing the message 'Nothing has been selected yet.'
[Updated on: Wed, 13 August 2008 07:05]
Report message to a moderator