So my last post pointed out the problem with making dynamically switching content in drupal 7 with the dynamic queries. Here is how you solve it:
//Adding JQuery from the system to perform the voodoo!
drupal_add_library('system', 'ui.tabs');
drupal_add_js('jQuery(document).ready(function(){jQuery("#some-menu").tabs({ fx: { opacity: "toggle" }});});', 'inline');
//Set the first query...or the query the first time
$setExamplePrepare= db_select('example', 'a');
$setExamplePrepare->leftJoin('example_joiner', 'b', 'a.nid= b.nid');
$setExamplePrepare->fields('a',array('Title'))
//I've changed the conditions and stuff..
->condition('a.somefield',$node->nid,'=')
->distinct()
->orderBy('b.vid');
$example = $setExamplePrepare->execute();
if ($example):
echo '

