scanreg Posted August 2, 2009 Share Posted August 2, 2009 I have the following: $categoryid = mysqli_real_escape_string($link, $_GET['category']); if ($categoryid != '') // A category is selected { $from .= ' INNER JOIN jokecategory ON id = jokeid'; $where .= " AND categoryid='$categoryid'"; } Does the order of the "ON id = jokeid';" matter? For instance, would the following be just as valid: $from .= ' INNER JOIN jokecategory ON jokeid = id'; An experiment seems to indicate that it doesn't but wanted to ask Many thanks Quote Link to comment https://forums.phpfreaks.com/topic/168466-solved-inner-join-does-the-order-of-the-on-elements-matter/ Share on other sites More sharing options...
phpSensei Posted August 2, 2009 Share Posted August 2, 2009 No it doesn't matter.... Quote Link to comment https://forums.phpfreaks.com/topic/168466-solved-inner-join-does-the-order-of-the-on-elements-matter/#findComment-888802 Share on other sites More sharing options...
scanreg Posted August 11, 2009 Author Share Posted August 11, 2009 Thanks so much Quote Link to comment https://forums.phpfreaks.com/topic/168466-solved-inner-join-does-the-order-of-the-on-elements-matter/#findComment-895757 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.