[development] Converting db_rewrite_sql for D7

Nancy Wichmann nan_wich at bellsouth.net
Sat Oct 10 22:18:31 UTC 2009


Does this look reasonable (sorry, I'm not far enough along to actually
test):

$where[] = sprintf('(r.rid IN (' . $filters['rid_filter']) . ' OR (%d IN ('
. $filters['rid_filter']) . ' AND n.uid = 0))', DRUPAL_ANONYMOUS_RID);

becomes:

$query->condition(db_or()->condition('r.rid', $filters['rid_filter'],
'IN')->condition(DRUPAL_ANONYMOUS_RID, $filters['rid_filter'],
'IN')->condition('n.uid', 0);


Nancy E. Wichmann, PMP
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King,
Jr.



More information about the development mailing list