phpmyadmin - Update prices in in MySQL database -


  1. i have libreoffice calc file 2 columns: id | new_price
  2. my opencart database table called product , has these relevant columns: id | price

i need update price in database based on id in calc file value in new_price.

i have phpmyadmin available, not sure how this.

could please guide me how achieve this?

load file new table using import function in phpmyadmin, let's called new_table , execute:

update      product set      price =      (         select              new_price                       new_table                       new_table.id = product.product_id     )     product.product_id in      (         select             id                     new_table     ) 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -