473,395 Members | 1,466 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,395 software developers and data experts.

resetting one particular field in all rows

hsriat
1,654 Expert 1GB
I have a grid table in the front end (PHP on server side), and the master admin can sort data in that grid according to his own wish and save that new sorted order. Once the master admin sorts the data, all the users view data in that order only. And only the master admin has the right to sort and change order.

What I'm doing is, I have an index field (not primary), according to which the data is displayed in ascending order. When the master admin sorts the data and saves that new order, the index field of all the rows in db are reset according to the new order. And for this resetting, I'm running UPDATE queries equal to the number of rows.

Now since there can be lot more then 100 rows, and moreover I don't know much about SQL except SELECT, INSERT and UPDATE queries.

So I was just if there is any other way to do this, so that I need not to run so much queries?

PS: Is it recommended to run around 200 UPDATE queries at a time?
Feb 23 '08 #1
3 1203
mwasif
802 Expert 512MB
So I was just if there is any other way to do this, so that I need not to run so much queries?
As far as I know, there is no other way.

Is it recommended to run around 200 UPDATE queries at a time?
It will not be a problem if the update statement is being executed on a small table. A table with 200 rows is a small table.
Feb 23 '08 #2
hsriat
1,654 Expert 1GB
As far as I know, there is no other way.


It will not be a problem if the update statement is being executed on a small table. A table with 200 rows is a small table.

Thanks for the response! :)

But If a table has 10000 rows, and then I have to update 200 rows.. any issue?
Feb 24 '08 #3
mwasif
802 Expert 512MB
There should not be problem if you have properly indexed your data.
Feb 25 '08 #4

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

Similar topics

4
by: Job Lot | last post by:
On form load my datagrid gets populated with values from database table. How can I reset values in my DataGrid to 0 on click of a button? thanks
3
by: dba2adm | last post by:
The SNAPSHOT_STATEMENT table function gives the CPU used rows read etc information. How do I know the total number of time the particular statement was executed (as in snapshot_dyn_sql's...
0
by: Diffident | last post by:
Hello All, Was wondering if we could retrieve the index of a particular row from a dataset's table based on the filter criteria for the row? For example, I have 4 rows in my datatable which...
4
by: Ian Davies | last post by:
Hello I am struggling for a solution to clear some fields on my webpage that takes their values from some sessions My solution below works when the button is clicked twice. I sort of know why I...
3
subashini Thiyagarajan
by: subashini Thiyagarajan | last post by:
<% Dim adoCon Dim rsDeleteEntry Dim strSQL Dim lngRecordNo lngRecordNo = CLng(Request.QueryString("ID")) lngRecordNo1 = CLng(Request.QueryString("ID"))
0
by: nityaprashant | last post by:
Hello.. could u plz help me? i have template column inside grid view.. in that one link button called Remove this? when i click on that link button confirmation box like "Are u sure u want...
4
by: kageyone | last post by:
I have an access database with a table with two fields. They are 1. a GUID field and 2. a comma delimited set of values. I want to take this table and for each row I want to do the following: ...
12
by: Marc Baker | last post by:
Bear with me here folks, I don't know much MS SQL performance. Wondering if someone can point me in the right direction. I have 1 particular database where queries are slow. To test this theory,...
1
by: Mark B | last post by:
VB.NET: How do I get the value of a particular field in the currently edited gridview row?
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.