glennn.php Posted September 17, 2008 Share Posted September 17, 2008 i'm going to end up running about 10 queries according to some previous queries; i knew better than to think what i tried below would work, but i'm hoping at least someone can see what i'm trying to accomplish (running a single query instead of running 10 seperate queries when the page is called)... could someone see what i'm attempting and describe how and if this can even be done? $query = mysql_query("SELECT * FROM rel_offering, rel_carnegie WHERE rel_offering.offering IN ($offerings), rel_carnegie.cc2001 IN ($carn_code_sql)"); while($row = mysql_fetch_array( $query )) { echo $row['offering_text']."<br>"; echo $row['cc_description']."<br>"; } ... and the tables... accreditations administrators characteristics rel_affiliation rel_calendar rel_carnegie rel_emphasis rel_inst_type rel_irs_status rel_mpc rel_offering rel_sex rel_states thanks so much, GN Quote Link to comment Share on other sites More sharing options...
corbin Posted September 18, 2008 Share Posted September 18, 2008 The INs are subqueries I'm assuming. Errr, are you selecting an entire table? If so, it might be slightly better to do a self join (or a subquery with criteria), but chances are, you're stuck doing a subquery. Just of curiosity, what is an example query? Quote Link to comment 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.