Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-23-2014, 06:07 PM   #1
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
php innerjoin question

I have 3 mysql tables

table1 =
orderid,shippingmethod

table2 =
transactionid,orderid

table3 =
transactionid,shipmethod2

I want to update all of table 1's shippingmethod to show the shipmethod2 from table 3

Can anyone post the code to do this? I am getting a bit confused
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2014, 08:11 PM   #2
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,078
Quote:
Originally Posted by mkx View Post
I have 3 mysql tables

table1 =
orderid,shippingmethod

table2 =
transactionid,orderid

table3 =
transactionid,shipmethod2

I want to update all of table 1's shippingmethod to show the shipmethod2 from table 3

Can anyone post the code to do this? I am getting a bit confused
update table_1 a inner join table_2 b on a.orderid=b.orderid inner join table_3 c on b.transactionid=c.transactionid set a.shippingmethod=c.shipmethod2

Should do it.

.
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-24-2014, 12:49 PM   #3
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
thanks ill give that a whirl
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.