Categories | Question details Back To List | ||
Use of undefined constant myUpdate - assumed 'myUpdate' hello Use of undefined constant myUpdate - assumed 'myUpdate' please tell me what i do i m stuck up of this error <?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); $projID=$_REQUEST['projid']; $grid->dynamic_loading(100); $grid->event->attach("beforeRender","my_format"); function my_format($data){ $value = $data->get_value("id"); $new_value = "Add"; $data->set_value("id",$new_value); } $grid->enable_log("temp_log",true); $grid->event->attach("beforeUpdate",myUpdate); function myUpdate($action){ mysql_query("UPDATE shotTaskArtist SET userID='{$action->get_value('name')}' WHERE shotID='{$action->get_id()}'"); $action->success(); } $grid->render_sql("select * from shot,shotTaskArtist where shotTaskArtist.projID = shot.projID and shot.projID='$projID' and shotTaskArtist.shotID = shot.shotID","shotID","id,shotID,shotStatus,taskID,TaskREF,task_note,manDays,userID,taskStatus,startDate,endDate,priority,naxt_sub,last_sub,actualMandays,supervisorName"); Answer posted by Alex(support) on Dec 11, 2009 00:41 Hello, >> $action->get_value('name') There isn't any field "name" in the "shotTaskArtist" table. Answer posted by Stanislav (support) on Dec 11, 2009 01:33 >>Use of undefined constant myUpdate - assumed 'myUpdate' The next line $grid->event->attach("beforeUpdate",myUpdate); need to be update as $grid->event->attach("beforeUpdate","myUpdate"); but this just a non-critical warning. |