Thank you for your prompt reply, however, your suggested solution shown below does not work for me.
$conn->sql->attach(“UPDATE”,“UPDATE events
SET details=’”.$_SESSION[‘MM_Username’]."’ WHERE event_id={id}");
Although $_SESSION has a result on other areas of the program (i.e., my SQL Statement), I’ve substituted a hard coded value to no avail. I’ve also tried the below solution which appears not to get triggered:
$res=mysql_connect("myservername ", “myusername”, “mypassword”);
mysql_select_db(“mydatabase”);
function [b]my_update/b{
global $conn;
$details = $data->get_value(“details”);
// $details="’".$_SESSION[‘MM_Username’]."’";
$details=“myhardcodedvalue”;
$id=$data->get_value(“id”);
$conn->sql->query(“UPDATE events
SET details=’{$details}’ where event_id={$id}”);
$data->success(); //if you have made custom update - mark operation as finished
}
$conn = new SchedulerConnector($res);
$conn->enable_log(“temp.log”);
$sql = “SELECT * FROM events
WHERE details = '”.$_SESSION[‘MM_Username’]."’";
//$conn->sql->attach(“UPDATE”,“UPDATE events
SET details=’”.$_SESSION[‘MM_Username’]."’ WHERE event_id={id}");
$conn->sql->attach(“UPDATE”,“Update events set details=‘Secretary Western Knights #56’ where event_id={id}”);
$conn->event->attach(“beforeUpdate”,“my_update”);
$conn->render_sql($sql,“event_id”,“start_date,end_date,event_name,details”);
//$conn->render_table(“events”,“event_id”,“start_date,end_date,event_name,details”);
Further, please see the below log file. Why does event_id come back as event_id => 1365530635272 when the value in the database for event_id is 1261152085
LOG FILE:
====================================
Log started, 09/04/2013 11:04:00
DataProcessor object initialized
1365530635272_start_date => 2013-04-12 15:05
1365530635272_end_date => 2013-04-12 15:10
1365530635272_text => New event
1365530635272_id => 1365530635272
1365530635272_event_name => test
1365530635272_details => test
1365530635272_!nativeeditor_status => inserted
ids => 1365530635272
Row data [1365530635272]
start_date => 2013-04-12 15:05
end_date => 2013-04-12 15:10
event_name => test
event_id => 1365530635272
details => test
!nativeeditor_status => inserted
INSERT INTO events
(start_date
,end_date
,event_name
,details
) VALUES (‘2013-04-12 15:05’,‘2013-04-12 15:10’,‘test’,‘test’)
Edit operation finished
0 => action:inserted; sid:1365530635272; tid:1261152085;
Done in 1.0140130519867s
====================================
Log started, 09/04/2013 11:04:03
SELECT * FROM events
WHERE ( details = ‘Secretary Western Knights #56’)
Done in 0.4634530544281s