You are here: Update one table field from another table field query? « PHP SQL « IT news, forums, messages
Update one table field from another table field query?

Posted by MattMika on 07/26/06 23:15

I recently changed the field length for products_model in our products
table from varchar(12) to varchar(15) and failed to update that field
in our orders_products table. So now I have incomplete model #'s in
our orders_products table.

I am unsure how to go about doing this in a query. Maybe something
like this?:

UPDATE orders_products SET products_model = (SELECT products_model
from products)
WHERE products.products_id = orders_products.products_id;

Any suggestions would be greatly appreciated.
TIA
Matt Mika

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация