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

Home » RADICORE development » Bug Reports » Insertorupdate and autoincrement
Insertorupdate and autoincrement [message #1792] Thu, 06 November 2008 05:46 Go to previous message
bonzo_bcn is currently offline  bonzo_bcn
Messages: 152
Registered: June 2008
Senior Member
I think there is a bug in the insertOrUpdate function.
I have a field in the table where I'm inserting te record that is autoincrement and pk.
With this code:
if ($existing_participante_id > 0){

  $insert_array['participante_id'] = $existing_participante_id;

}
$insert_array['tippart'] = 'E';
$insert_array['catsalut'] = $data['catsalut'];
$insert_array['nompart'] = $data['nompart'];
$insert_array['apellido1'] = $data['apellido1'];
$insert_array['apellido2'] = $data['apellido2'];

$insert_array = $participante->insertOrUpdate($insert_array);

I don't get returned the generated autoincrement in $insertarray

on the other hand, if I do it like this:
if ($existing_participante_id > 0){

				
	$insert_array = $participante->updateRecord($insert_array);

}else{
				
				
	$insert_array = $participante->insertRecord($insert_array);
			}	


the autoincrement is returned in $insert_array
 
Read Message
Read Message
Read Message
Previous Topic: Multi2 -> popup2 not calling _cm_pre_updateRecord?
Next Topic: Problem with accentuated char and Uppercase
Goto Forum:
  


Current Time: Sat May 18 14:20:30 EDT 2024

Total time taken to generate the page: 0.00839 seconds