Sunday, December 12, 2010

Standardized Query to update an record in Drupal 7

db_update('table1')
->fields(array(
'status' => 1,
'weight' => 1,
'region' => 'left',
))
->condition('module', 'table1')
->condition('delta', 1)
->condition('theme', 'Garland')
->execute(

No comments:

Post a Comment