Ok people I am new to programming so if this is really simple please don't laugh.
Hi All below you find a a chunk of code I need help finishing. What I am trying to do is get the total changes in one column called status. I can use the getICMSData to retrieve data then if I could get it to populate the $newcount then output to a .txt file. Right now my code works if I hard code a number into the $newcount. Idealy I would like to get that number from the my GetICMSData or if there is another way that is cool as well. If I am not clear please reply asking questions.
PHP Code:
<?
function CountDefUpdates ()
{
//GetICMSData
UpdateICMS("UPDATE desktops SET status = \"dupend\" WHERE status = \"installed\" AND spy_policy_index = 2",$link);
$newcount =
$file="count.txt";
$fh1=fopen($file,"r");
$count=fscanf($fh1,"%d");
fclose($fh1);
//echo $newcount;
//echo $count[0];
$fh=fopen($file,"w+");
$count[0]=$count[0]+$newcount;
fprintf($fh,"%d",$count[0]);
fclose($fh);
}
?>