View Single Post
Old 04-17-2005, 07:00 AM   #6 (permalink)
Buck_NAkie
Registered User
 
Join Date: Apr 2005
Posts: 4
Buck_NAkie is on a distinguished road
thanks still stuck

Thanks for looking

SDE the out put is a single number that gets overwritten everytime.

redhead:here is the code my question is how do I put a number from my query into newcount
PHP Code:
function CountDefUpdates ()
{
    
$newcount GetICMSData ("SELECT COUNT(*) FROM desktops WHERE status=\"installed\"",$link);

    
UpdateICMS("UPDATE desktops SET status = \"dupend\" WHERE status = \"installed\"AND spy_policy_index = 2",$link);

  
//$newcount =(10);

  
$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);



Last edited by redhead; 04-17-2005 at 07:29 AM.
Buck_NAkie is offline   Reply With Quote