harkly Posted December 17, 2009 Share Posted December 17, 2009 I am selecting info from around 13 tables and I was wondering if there is a more efficient way to do this then what I have done. Mine does work so just wondering. WHERE about_me.userID = 'test' AND pets.userID = 'test' AND appearance.userID = 'test' AND eg.userID = 'test' AND interest.userID = 'test' AND exercise.userID = 'test' AND art.userID = 'test' AND hobbies.userID = 'test' AND music.userID = 'test' AND rlat.userID = 'test' AND user.userID = 'test' AND photos.userID = 'test' AND bkgd.userID = 'test'") or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/185418-select-more-than-one-table/ Share on other sites More sharing options...
killerb Posted December 17, 2009 Share Posted December 17, 2009 When you have data scattered all around different tables, the only way to optimize a heavy join is to index periodically and select your *whatever_id* from the index table. This is common practice for example on searches where the best efficiency is required on select whereas a few seconds delay on update/insert is tolerable. Quote Link to comment https://forums.phpfreaks.com/topic/185418-select-more-than-one-table/#findComment-978863 Share on other sites More sharing options...
fenway Posted December 18, 2009 Share Posted December 18, 2009 I also doubt you mean AND. Quote Link to comment https://forums.phpfreaks.com/topic/185418-select-more-than-one-table/#findComment-979580 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.