before update eveny system

hello,



i am using event sytem for update but $action->get_data(‘name’) it will return me array so field must be update but updated by “array” please tell me what i do below is the my code





<?php     $res=mysql_connect(“localhost”,“root”,"");



    mysql_select_db(“kanibrainnew1”);



    require_once("…/dhtmlxConnector_php/codebase/grid_connector.php");



    $grid = new GridConnector($res);



    $grid->dynamic_loading(100);



//    $grid->render_table(“products”,“nm”,“code,num_val,shotid,shotstatus,taskid,taskref,tasknote,userid,taskstatus,start_date,end_date,alloted_mandays,task_priority,next_sub,actual_manday”);







$grid->enable_log(“temp_log”,true);



$grid->event->attach(“beforeUpdate”,myUpdate);







function myUpdate($action){



echo “ppppp”;



echo “kjgkjgk”.$action;







echo “
”;







echo “UPDATE shot SET shotStatus=’{$action->get_data(‘name’)}’ WHERE shotID=’{$action->get_id()}’”;



exit;



mysql_query(“UPDATE shot SET shotStatus=’{$action->get_data(‘name’)}’ WHERE shotID=’{$action->get_id()}’”);



$action->success();



}







//if($grid->is_select_mode()){//code for loading data



$grid->render_sql(“select * from shot,shotTaskArtist where shotTaskArtist.projID = shot.projID and shot.projID=‘om’ and shotTaskArtist.shotID = shot.shotID”,“shotID”,“shotID,shotStatus,taskID,TaskREF,task_note,mandays,userID,taskStatus,startDate,endDate,priority,naxt_sub,last_sub,actualMandays,supervisorName”);



//}else{//code for other operations - i.e. update/insert/delete



//$grid->render_table(“shot”,“shotID”,“shotID,shotStatus,priority,projID”);







//$grid->render_table(“shotTaskArtist”,“id”,“taskID,TaskREF,task_note,mandays,userID,taskStatus,startDate,endDate,naxt_sub,last_sub,actualMandays,supervisorName”);



//}











?>







please reply me as soon as possible




Hello,


please try to use get_value method instead of get_data.


Moreover echo calls are useless. Try use enable_log method to get error details.