Conditional INNER JOIN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is it possible to do a conditional INNER JOIN ?

So far I have 

SELECT * FROM ( shopping_cart_orders INNER JOIN
shopping_cart_sales_shipping_address ON
shopping_cart_orders.shipping_address_reference =
shopping_cart_sales_shipping_address.reference )

If shopping_cart_sales_shipping_address.same_as_customer has a value of
"0" I need to 

INNER JOIN shopping_cart_sales_billing_address WHERE
shopping_cart_sales_billing_address.shipping_address_reference =
shopping_cart_sales_shipping_address.reference

otherwise the shipping address is the same as the billing address.
Suggestions?

Ron


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux