http://upgrade.boombatower.com/tools/sql/inline

db_select('user_badges_roles', 'ubr')
  ->fields('ubr', array('rid', 'ubb'))
  ->join('user_badges_badges', 'ubb', 'ubb.bid = ubr.bid')
  ->condition('ubr.rid', '@todo Set the appropriate argument.')
  ->execute();


----------------------------------
Dipen Chaudhary
Founder, QED42 : We build beautiful and scalable web strategies ( www.qed42.com )
Blog: dipenchaudhary.com
Twitter: http://twitter.com/dipench



On Tue, Oct 11, 2011 at 9:05 PM, Ms. Nancy Wichmann <nan_wich@bellsouth.net> wrote:
Before I pull any more hair out, can someone properly convert this to a D7 select query, please:
SELECT ubr.rid, ubb.* FROM {user_badges_roles} ubr INNER JOIN {user_badges_badges} ubb ON ubb.bid = ubr.bid WHERE ubr.rid = %d

It didn't seem all that difficult, but I keep getting errors.
 
Nancy
 
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.

--
[ Drupal support list | http://lists.drupal.org/ ]