posted 13 years ago
Hi ,
I am sorry for being late in reply . I got my question solved , actually I changed my code as follows:-
My original code :-
Thinking that the code coming from database is ordered in the way the rows were inserted . However my data coming from the database was in some random order . Every time a user logged in all the rows were retrieved from the database . So if the third user logs in my result set was giving me three records . I wanted the last record inserted as it contained the field which holds the latest value of a count variable (number field) . So my res_count variable was holding any of the three values (whichever was retrieved last ) that is why my result was inconsistent . So I changed my code as:-
In this case my res_count always holds the last (greatest value of count ) which is what i want . So i am able to get consistent result and my doubt gets solved .
Thank you folks .