[support] Converting a query to D7

Dipen dipench at gmail.com
Tue Oct 11 15:50:21 UTC 2011


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 at 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/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20111011/b12e5313/attachment.html 


More information about the support mailing list