Hi I have a phpcode that fetches data from database ,
I want to lock a row when a user reads that row and want to release it when he exits.
Can any one help me plz

Recommended Answers

All 5 Replies

It depends on the database you are using whether or not this is possible.

Hi,
It's upto on database

And it also depends on the table type (engine) within a database. In mySql it is possible to do it if table type is InnoDb, but not if the type is MyIsam.

Mine is InnoDb, I tried setting a flag with the time stamped in it , and after ever 15 minutes I wrote a code to reset the flag, Is it the right method.

I can't give you a good answer since I haven't used this feature so far so maybe you should ask in a mysql forum on daniweb instead.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.