MySQL Forums
Forum List  »  Newbie

Re: double join in update?
Posted by: Yakymenko Serhiy
Date: June 29, 2012 01:09AM

actualy no, in this case it will be much easier, thanks for an answer.

this is popular public open source Content Managment System, and i am not an athor,
task has been simplyfied by me, to be easy explained.

need an answer. is it posible with current structure?

any suggestion will welcome.

this topic should be not in newbie forum maybe.

my solution is:

UPDATE `products` SET agregate_field=concat(( SELECT `categories`.'category_name' FROM `product_categories`,`categories`,`products` WHERE `categories`.'category_id'=`product_categories`.'category_id' AND `product_categories`.'product_id'=`products`.'product_id' AND HOW_TO_GET_CURRENT_PRODUCT_ID_IN_HERE ),product_name)



Edited 1 time(s). Last edit at 06/29/2012 01:40AM by Yakymenko Serhiy.

Options: ReplyQuote


Subject
Written By
Posted
Re: double join in update?
June 29, 2012 01:09AM
July 01, 2012 08:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.