[development] important reminder: do not use API functions in update code

Gábor Hojtsy gabor at hojtsy.hu
Tue Dec 4 14:59:59 UTC 2007


On Dec 4, 2007 3:44 PM, Sean Robertson <seanr at ngpsoftware.com> wrote:
> So all modules should still use db_query for updates (as in 5.x) or does
> this only apply to core?

How is this related? It depends. When you need to update thousands of
items one by one, you are better doing db_query(). With results going
to the update screen, use update_sql(). This is the de-facto way for
now as far as I see. We will see whether the update_sql() or
db_query() syntax changes in Drupal 7, which will break all update
functions too.

Gabor


More information about the development mailing list