[development] D7 Query placeholders and values

Nancy Wichmann nan_wich at bellsouth.net
Wed Aug 26 18:11:14 UTC 2009

Since I see Larry Garfield has looked at this list today, I thought I would
ask this now since I just had this come up.

I know about the new ":label" for substitution in D7 and have no problem
with that. But what do I do with an array of values, as in:
  $types = variable_get('my_types_list', array());
  $args += $types;
  $result = db_query(..., $args);

Yes, I properly used db_placeholders to set the "%s" values in place. The
query works fine in D6, it's just that I am already looking at teh upgrade
and wondered about how to do arrays of values like this, when I can't go in
and add a label to them.

Nancy E. Wichmann, PMP

Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/development/attachments/20090826/b2268a1a/attachment.htm>

More information about the development mailing list