update data using dataprocessor

Hello,



i m using data processor for update the row but it give me nothing below is my code please tell me what i do or some other way to update the data.





update.php



<?php

//code below is simplified - in real app you will want to have some kins session based autorization and input value checking

error_reporting(E_ALL ^ E_NOTICE);



//include db connection settings

require_once(‘config.php’);

require_once(‘config_dp.php’);





function update_row(){

    $sql =     “UPDATE shotTaskArtist SET checkEfficiency=’”.$_GET[“c0”]."’,

                shotID_new=        ‘".addslashes($_GET[“c2”])."’,

                taskID=        ‘".addslashes($_GET[“c4”])."’,

                TaskREF=        ‘".$_GET[“c5”]."’,

                task_note=    ‘".$_GET[“c6”]."’,

                manDays=    ‘".$_GET[“c7”]."’,

                userID=    ‘".$_GET[“c8”]."’,

                taskStatus=    ‘".$_GET[“c9”]."’

                startDate=    ‘".$_GET[“c10”]."’

                endDate=    ‘".$_GET[“c11”]."’

                task_priority=    ‘".$_GET[“c12”]."’

                actualMandays=    ‘".$_GET[“c15”]."’

                supervisorName=    ‘".$_GET[“c16”]."’



            WHERE id=".$_GET[“id”];

    $res = mysql_query($sql);

    

    return “update”;    

}







//include XML Header (as response will be in xml format)

header(“Content-type: text/xml”);

//encoding may differ in your case

echo(’<?xml version="1.0" encoding="iso-8859-1"?>’);





$mode = $_GET["!nativeeditor_status"]; //get request mode

$rowId = $_GET[“id”]; //id or row which was updated

$newId = $_GET[“id”]; //will be used for insert operation





switch($mode){

    case “inserted”:

        //row adding request

        $action = add_row();

    break;

    case “deleted”:

        //row deleting request

        $action = delete_row();

    break;

    default:

        //row updating request

        $action = update_row();

    break;

}





//output update results

echo “”;

echo “”;

echo “”;



?>







<?php

    include("…/…/include/system/system.php");

    include("…/…/include/login/login_test.php");

    include("…/…/include/header/header.php");

    include("…/…/include/config/config.php");

    

    $sql = mysql_query(“SELECT projID from projTable where userID=’”.$_SESSION[MyUserId]."’") or die(mysql_error());

    $count = mysql_num_rows($sql);

    if($count > 0) {

        while($rs = mysql_fetch_array($sql)) {

            $projIDs = $rs[‘projID’];

        }

    }

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    “http://www.w3.org/TR/html4/loose.dtd”>







    

    

    

    

    

    

    



    

    

        

        

        

        

    

    

    

    

    

    



<?php if($projIDs !="0") {?>



<?php } ?>

    



    





<?php /$col = $_GET[‘colNum’];



if($col == 1) {

    $shotID = $_GET[‘shotID’];

    $where1 = " AND shotID=’".$shotID."’ “;

    $where = " AND shotID=’”.$shotID."’ “;

}

if($col == 9) {

    $userID = $_GET[‘shotID’];

    $where = " AND userID=’”.$userID."’ “;

}



echo “SELECT shotID from shot WHERE projID=’$projIDs’ “.$where1.””;

$sql = mysql_query(“SELECT shotID from shot WHERE projID=’”.$_GET[‘projID’].”’ “.$where1.”") or die(mysql_error());

echo “ppp”.$count = mysql_num_rows($sql);



$sql1 = mysql_query(“SELECT sum(mandays) as mand from shotTaskArtist WHERE projID=’”.$_GET[‘projID’]."’ “.$where.” “) or die(mysql_error());

while($rs = mysql_fetch_array($sql1)) {

    $mandays = $rs[‘mand’];

}

//echo “SELECT sum(dailyReport.mandays) as actMan from dailyReport LEFT JOIN shotTaskArtist ON shotTaskArtist.shotID=dailyReport.shotID WHERE dailyReport.projID=’”.$_GET[‘projID’].”’ “.$where.” “;

//echo “SELECT sum(manDays) as actMan from dailyReport WHERE projID=’”.$_GET[‘projID’].”’ “.$where.” “;

$sql1 = mysql_query(“SELECT sum(manDays) as actMan from dailyReport WHERE taskID!=‘sup’ and projID=’”.$_GET[‘projID’].”’ “.$where.” ") or die(mysql_error());

while($rs = mysql_fetch_array($sql1)) {

    $actMan = $rs[‘actMan’];

}
/

?>





















  

  





    

    

    

    

    

Total Shots :<?=$count?> Total Alloted Mandays : <?=number_format($mandays,2)?> Total Actual Mandays : <?=number_format($actMan,2)?>




d








<?php

include("…/…/include/header/footer.php");

?>







please reply me as soonn as possible

Unfortunately we cannot reproduce this issue locally. Working dataProcessor samples you can find at your dhtmlxGrid package dhtmlxGrid\04_dataprocessor\