Categories | Question details Back To List | ||
Problem with update after insert in Scheduler I am uing the following code without issue in FireFox but it does not work in IE. The success($thisid) seems to work on the next insert so it appears to be one transaction behind at all times. (the screen updates the first event after adding the next) ########################################################################### public function insert($data,$source){ //custom class $db = new DatabaseConnection(); $sql=$this->insert_query($data,$source); $this->query($sql); $thisid=$this->get_new_id(); $custid=$data->get_value("customerid"); //find the customer from the event_rec table $studsql="select firstname, lastname from customer where customerid=".$custid; $res = $db->getRecord($studsql); $fullname = $res['firstname'] . " " . $res['lastname']; //set the text to the customer name $update_sql ="UPDATE events_rec SET text='".$fullname."' WHERE event_id='".$thisid ."'"; $db->do_sql($update_sql); $data->success($thisid); } ############################################################################# Thanks in advance for any assistance. Answer posted by Alex (support) on Nov 05, 2009 01:36 Do you use connectors ? The provided function calls methods from some other classes. But if you use connectors, try to enable logs to get more information about the issue: $scheduler = new schedulerConnector(....); $scheduler->enable_log("log.txt",true); Please, provide more details to solve the issue. Answer posted by John McGrath on Nov 05, 2009 06:30 I do use connectors but also a custom class. I have has logging turned on but see no errors. Once again, it works perfectly in Firefox just not IE. Below is a copy of a log entry...
==================================== SELECT event_id,start_date,end_date,text,customerid,serviceid,rec_type FROM events_rec Done in 0.0020232200622559s
==================================== SELECT event_id,start_date,end_date,text,customerid,serviceid,rec_type FROM events_rec Done in 0.0024349689483643s
==================================== DataProcessor object initialized Row data [1257431305657] INSERT INTO events_rec(start_date,end_date,text,customerid,serviceid,rec_type) VALUES ('2009-11-3 08:15','2009-11-3 08:30','New Appointment','90','496','') Edit operation finished Done in 0.0039138793945312s
Answer posted by Alex (support) on Nov 05, 2009 06:53 So... if you use a custom solution, how can we solve the issue ? Try to check that you code returns the correct xml as the response.
|