0

Hello all,
I am stuck at some logic and can't able to find stuffs for my research.I have a web based data Entry app in php.Now there will be atleast 2 operators for data entry.now when they login they will redirected to same page.I fetch one file at a time.Here is couple of things I am confused

1.Both Operators see same files when they are redirected to their page[ as records are fetched sequentially from in increasing oreder pf primary key in database ].how can i show different files to users?

2.let's assume they look same file they can do entry at same time and same time.How can i put restrictions in real time that this file is edited by someone else switch to another one.

thanks in advance

3
Contributors
5
Replies
38
Views
7 Months
Discussion Span
Last Post by KaleBeatroot
0

This was solved over a decade ago by not editing files but using a web front end that would file the content away in a database.

SQL is common today and supports thousands at a time doing data entry to the database.

0

Yeah i know, I have web fronend having ajax,javascript and php.say for example you are editing this post then others should know that some one is queue you have to wait to till the processing is done,or other users are not allowed to see this post am i clear now?

2

Let's go with your idea of a lock. Sure thing. In your frontend app you checkout the doc or file and when it's done check it in. Think of it like books at a library.

So when your next editor/person comes along your front end sees if it's open for check out.

This is not an offer to write any code.

But all this would be best done in a database and not files for most systems. For example I had a client last year that insisted on the database be done in Excel. I would not implement such a system and no one else did either. They were calling in programmer after programmer to fix what they had and no one would accept the job. I did try but they were not interested in why Excel was the wrong answer. Much like files would be for many user editing. As far as I know, they are still crashing and burning.

0

DIY job on this can get messy. How about version Control or git with check in and out?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.