Hi all,
In the code below what I am trying to do and failing at is.
1st get data to find the newcount then take new count ad output it to a text file. Any help and I will be in your debt.
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);
}
PHP and MYSQL help neededtrying to get output to a text file
Page 1 of 1
1 Replies - 1267 Views - Last Post: 17 April 2005 - 10:14 AM
Replies To: PHP and MYSQL help needed
#2
Re: PHP and MYSQL help needed
Posted 17 April 2005 - 10:14 AM
Can you be more specific about the problem? Is the query not returning the right results? Is it not writing to the file? You're also calling a couple of functions that are not defined here, so it's a little hard to tell if that's where the problem might be. If you could specify in which way the code is not performing to your expectations, it would be most appreciated.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|