http://bugs.mysql.com/bug.php?id=27033
Suggested fix: Go back to Version 5.0.27 or work around by first INSERTing and after that SELECTing (more expensive). Alternatively, make the insert function with a NULL Primary Key during insert into an auto increment field. This function may clash when we want to start incrementing from a bigger number: 10000000 > Hi > > Am Mittwoch, den 29.09.2010, 03:23 +0530 schrieb Ap.Muthu: >> Just before line 42, >> $_SESSION['pid'] = 0 >> $_POST is blank >> $_REQUEST[' pid'] = 0 > > That's ok, no problem. But maybe I found the issue, but not the > solution. > > class_gui_input_person.php, after line 311 the section start where a new > patient will be inserted to the database: > > > <------------> > if(!$error_person_exists||$mode=='forcesave'){ > if($person_obj->insertDataFromInternalArray()){ > <------------> > > This part is ok (checked). The record will be created, all values as far > I could see are there. Perfect. > > The source of this bug must be somewhere here: > <------------> > if(!$update){ > $oid = $db->Insert_ID(); > $pid=$person_obj->LastInsertPK('pid',$oid); > //EL: set the new pid > $person_obj->setPID($pid); > } > <------------> > In fact: If you have an empty care_person, $db->Insert_ID() will return > zero -> pid will be set to 0. > > But the record is there. So after the 2nd call of this part of the > script (another patient will be registered), the Insert_ID() adodb > function returns the correct value. > > That seems for me the real source of all these kind of bugs (even the > pic, because the filename of the patient picture is given by its pid, > when it is 0 then it will be called 0.jpg etc.) > > So either it is here an real adodb issue (why does it not happen > before?) or the table creation had been changed. > > Any idea? > Robert ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Care2002-developers mailing list Care2002-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/care2002-developers