sonicthehedgehog Posted September 7, 2015 Share Posted September 7, 2015 (edited) Is there a way I can combine these two queries into one: <?php$sql_select = "SELECT * FROM feeds, product_categories_map WHERE enabled=1 and deleted=0 GROUP BY feeds.id";$sql_select = "SELECT cost as shipping_cost FROM delivery, seller WHERE seller.id=delivery.seller_id and delivery.country_id=".dbstr( $_POST['country'] );?> Edited September 7, 2015 by sonicthehedgehog Link to comment Share on other sites More sharing options...
Chikwado Posted September 7, 2015 Share Posted September 7, 2015 (edited) You can use sql join. Join left or Join right. My mouth corrected Edited September 8, 2015 by Chikwado Link to comment Share on other sites More sharing options...
justsomeguy Posted September 8, 2015 Share Posted September 8, 2015 Join, not joint. Link to comment Share on other sites More sharing options...
thescientist Posted September 8, 2015 Share Posted September 8, 2015 far out man... Link to comment Share on other sites More sharing options...
sonicthehedgehog Posted September 9, 2015 Author Share Posted September 9, 2015 Thanks I actually changed the tables in the database too as I realised the connections where too distant in that I can to connect to four tables to get the result - now I just need to connect to two Link to comment Share on other sites More sharing options...
Chikwado Posted September 10, 2015 Share Posted September 10, 2015 You can use 4 of them too, search for how to run several table. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now