0

I am trying to get my query correct in phmyadmin before using it in my code and i get the following error, although i know the column exists

Error
SQL query:


UPDATE 
tendesig_zink_dev.euid0_hikashop_product 
SET 
tendesig_zink_dev.euid0_hikashop_product.product_quantity = tendesig_zink_production.euid0_hikashop_product.product_quantity
WHERE 
tendesig_zink_dev.euid0_hikashop_product.product_id = tendesig_zink_production.euid0_hikashop_product.product_id

MySQL said: Documentation

#1054 - Unknown column 'tendesig_zink_production.euid0_hikashop_product.product_id' in 'where clause' 
2
  • Do you really have a column named euid0_hikashop_product.product_id? Commented Jul 22, 2014 at 19:32
  • yes (database)tendesig_zink_production.(table)euid0_hikashop_product.(column)product_id Commented Jul 22, 2014 at 19:34

1 Answer 1

2

The reason you are getting an unknown column error is because your query does not know about the table tendesig_zink_production.euid0_hikashop_product. Try using this query

UPDATE 
tendesig_zink_dev.euid0_hikashop_product, tendesig_zink_production.euid0_hikashop_product
SET 
tendesig_zink_dev.euid0_hikashop_product.product_quantity = tendesig_zink_production.euid0_hikashop_product.product_quantity
WHERE 
tendesig_zink_dev.euid0_hikashop_product.product_id = tendesig_zink_production.euid0_hikashop_product.product_id
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.