How to multi row update

Hi guys, I have looked all over and can not find an answer.

I have a table and I want to update two columns in some of the rows.

Using phpmyadmin I can select all the rows I want to update, but to do that I have to use a JOIN, and when I do I loose the edit,delete buttons over on the lift of of the result in phpmyadmin.

I have no problem editing each row, but I must do a select first as there are to many rows to wade through.

So what is the best way to do this kind of update?



this does not require a join

why not show us a sample of the table and what you are trying to do instead of having us guess?

The values are all different for each row, no calc, just enter a value.

What rule/logic are you using to update those columns? Set everything to a fixed value? Calculation over other columns? etc, etc … :slight_smile:

I have a table and I want to update two columns in some of the rows. Not to many rows to update, just a lot of rows in the table that needs update.

I can update a row at a time, no problem. But I can not get just those rows in front of me with the edit button in phpmyadmin.

but a query would be great, I just have not found how…

What are you trying to update exactly? It sounds like you could just run one UPDATE query instead of updating everything manually which you seem to be doing now …

I have to use a join to get the result set that I want to do the update on.

I select the table alright but filter it by category this is stored another table…

Well I am not a coder so maybe I do not have the words… sorry.

So I do dump to sql, I step down through the rows, make the changes, drop the table, and re create. Job done for now.

INSERT INTO `0_loc_stock` (`loc_code`, `stock_id`, `reorder_level`, `reorder_qty`) VALUES
('10', '08080_00000_G005', 0, 0),
('10', '1/8X1/8F3HGS', 0, 0),
('10', '100127', 0, 0),
('10', '1106', 0, 0),
('10', '1112', 0, 0),
('10', '1142-W12-W-N', 0, 0),