473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to lock selected rows from reading in other session?

12
How to block selected rows from reading in other session unless unlock it?
Nov 27 '12 #1
5 1901
zmbd
5,501 Expert Mod 4TB
Salsan,
You need to provide a little more detail as to how you are accessing the database.
Nov 27 '12 #2
salsan
12
Its for a multithreaded php application accessing mysql database from each instance. Whenever one instance is accessing the database the table must get locked from accessing other instances and other instances should wait till the lock release.
Nov 27 '12 #3
Can u please put in the code u tried so far.

Thank you.
Nov 27 '12 #4
zmbd
5,501 Expert Mod 4TB
The code would be nice.

IMHO: this doesn't seem like a MySQL issue in as much as it is how PHP is opening the recordset and how the servers handle PHP actions.

I can move this thread to the PHP forum if you'd like.
Nov 27 '12 #5
salsan
12
Expand|Select|Wrap|Line Numbers
  1. LOCK TABLE email_list WRITE;
  2.  
  3. SELECT * FROM email_list LIMIT 10;
  4.  
  5. INSERT INTO .....
  6.  
  7. UNLOCK TABLES;
This is the query i have used in that.
Nov 28 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Maggie Eusebio Schock | last post by:
Hi, I would like to understand when a selected cell, selected row or selected rows in the DataGrid control ends up on the clipboard. All I know is that the selection ends up on the clipboard,...
5
by: Mojtaba Faridzad | last post by:
Hi, with SetDataBinding( ) a DataGrid shows a DataView. user can select some rows in the grid by holding cotrol key. when user clicks on Delete button, I should delete all selected rows. I am...
3
by: BBFrost | last post by:
Ok, I know how to count the number of selected datagrid rows using the code below. What has me stumped is how to determine when the selected rows within a datagrid have been changed. The...
5
by: BBFrost | last post by:
Win2000 ..Net 1.1 SP1 c# using Visual Studio Ok, I'm currently in a "knock down - drag out" tussle with the .Net 1.1 datagrid. I've come to realize that a 'block' of rows highlighted within...
1
by: Alex K. | last post by:
I need to be able to jump to first selected row in DataGrid. How can I do this without using IsSelected for each row? Is there some sort of collection which contains all selected rows? Thank you.
3
by: MrNobody | last post by:
There does not seem to be any way except a method called UnSelect which requires an index- which I don't have.... is there any other way to simply deselect rows or perhaps iterate through selected...
4
by: Henry J. | last post by:
Can somebody tell me how to delete multiple rows in a datagridview selected by the user? I tried the following two methods to no avail. I have a myDataGridView that is bound to myDataTable's...
1
by: Marc R. | last post by:
hi, Is that such thing as selected collection exist ? I need a way to select all selected rows into a datagrid then "unchecked" the Active columns then save the result. but as soon i modified...
0
by: Tim Kelley | last post by:
I have a dataviewgrid in my project which the user will select multiple rows. They will click a button and my program will perform some operation on the selected rows. My question is, how do I...
3
by: jamesnkk | last post by:
Hi, every time I run the below statement, it display error message "Could not Update , currently lock by other session in this computer. I am running on a stand-alone PC. Dim rst As New...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.