View Single Post
Old 04-17-2005, 07:39 AM   #7 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,693
redhead is on a distinguished road
hmmm.. I havn't used this type of account holding, but from my point the $count=fscanf($fh1,"%d"); will let $count hold the value in the file (if the file only holds one number) thus the statement $count[0] won't return the correct value, instead $count will be the way to get the number.
How about something like:
PHP Code:
   fscanf($fh1"%[0-9]"$count); 
Your $newcount should be formed in the way, where $newcount[0] is holding the actual value, thus you would need to make your increment line something like:
PHP Code:
$count+=$newcount[0]; 
:: edit
I just realize, I dont even know what your GetICMSData() is doing, so I can't comment on wether $newcount is the value or $newcount[0], my suggestion was formed given the fact, that
PHP Code:
$res mysql_query("SELECT COUNT(*)...");
value mysql_fetch_array($res); 
makes $value hold the number in the way I describe $newcount.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote