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

Home » RADICORE development » Application Development » Help/suggestions with record filtering by user
Re: Help/suggestions with record filtering by user [message #1445 is a reply to message #1444] Thu, 10 July 2008 10:12 Go to previous messageGo to previous message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
participante_id is a field of the record that is being inserted. It is an autoincrement and the primary key of the table, so now I see why it's null. Anyway I tried adding this code:
	if (is_null($fieldarray['participante_id'])){
				$part = new participante;
				$part->sql_select = 'participante_id';
				$participante_id = $part->getData("catsalut='".$fieldarray['catsalut']."'");
			
		}else{
			$participante_id = $fieldarray['participante_id'];
		}


to

	function _cm_post_insertRecord($fieldarray)

	{
		require_once 'classes/entidad.class.inc';
		$entidad = new entidad;       
	    $entidad->sql_select = 'entidad_id';
		$entidad_id = $entidad->getData("nombre='" .$_SESSION['role_id'] ."'");	

		
		
		
        require_once 'classes/part_ent_xref.class.inc';
		$part_ent_xref = new part_ent_xref;       
		
		if (is_null($fieldarray['participante_id'])){
				$part = new participante;
				$part->sql_select = 'participante_id';
				$participante_id = $part->getData("catsalut='".$fieldarray['catsalut']."'");
			
		}else{
			$participante_id = $fieldarray['participante_id'];
		}
		 
		
		$insert_array['participante_id'] = $participante_id;
		$insert_array['entidad_id'] = $entidad_id[0]['entidad_id'];
		$insert_array = $part_ent_xref->insertOrUpdate($insert_array); 
		
		if ($part_ent_xref->errors){
			$this->errors = $part_ent_xref->errors;
			return $fieldarray;
		}
		return $fieldarray;
	}


but I get a null value in $fieldarray['catsalut'], catsalut is a field of the record that is being added.

Your help is really apreciated.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Next Topic: Problem with two list1 transactions on one table
Goto Forum:
  


Current Time: Wed Nov 27 07:26:53 EST 2024

Total time taken to generate the page: 0.01048 seconds