Your immediate problem in your
program is
almost certainly that your
data has
rows with many fields, but you are checking for equality
with a string with 2 fields. That is never going to work,
perhaps you meant to call index instead?
However aside from the immediate problem, you have others.
For instance your data format is very fragile, and your
file-locking is definitely not working like you think it
is. (When you close the file you lose the lock, then
someone else can arrive and read the lock while you figure
out what to write, then you write, then they write and your
write was lost. Under load you will constantly lose votes.)
I suggest switching to locking a sentinel file to solve your
locking problem, or else switching to a database to solve
both your locking mistakes and your data format fragility. | [reply] |
there is no error. the problem must be logic based (probablly because im using the wrong command to do what i want to do) The major problem im running into is the fact that after reading in the data, everything goes perfectly but as soon as it gets to the second record the data dissapears and all variables go blank. | [reply] |
What was the error message? Did anything make it to the browser? More likely you need to look in the server error log. | [reply] |