By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

multiple update in of rows in mysql using php

P: 1
Hi!
i need to select multiple rows, edit them and update the specific row in MySQL using PHP.please help me.
Mar 26 '12 #1
Share this Question
Share on Google+
3 Replies


helimeef
P: 77
From w3schools:
Expand|Select|Wrap|Line Numbers
  1. $result = mysql_query("
    UPDATE table_name
    SET column1=value, column2=value2,...
    WHERE some_column=some_value
    ");
I hope this answers your question -- it was quite hard to understand what you were asking.
Mar 26 '12 #2

P: 93
first make one checkbox to select many rows then, get those all rows primary value(something like "id") then count the selected checkboxes and put them into the loop to inserting data or updation data.
Apr 16 '12 #3

100+
P: 1,059
you can do as bharat suggested

or you have another trick that you can do

keeping an array :

say row 1, row 2, row 3;

create an array of 3 object. if user make any chnage in row 1 then set high to array 1. if 2 then array 2.

in the server php would read the least of updated row and only do the update execution only the changed row.

you can do far more trick with change action and array. all you need to do is build the idea ;)
Apr 16 '12 #4

Post your reply

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