Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Application Development » $where clause problem with list1 and read
$where clause problem with list1 and read [message #1543] Wed, 13 August 2008 06:24 Go to previous message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with two list1 transactions on one table
Next Topic: How can I achieve retrieving data from different tables and marking them as printed?
Goto Forum:
  


Current Time: Mon Apr 29 11:40:09 EDT 2024

Total time taken to generate the page: 0.01202 seconds