$number_deleted=db_query("DELETE FROM {node_field_instance} WHERE type_name = '%s' AND field_name = '%s'",$properties['type_name'],$properties['field_name']);
@@ -12,9 +12,9 @@ function optionwidgets_install() {
*/
functionoptionwidgets_update_1(){
$ret=array();
// find distinct values already stored in the database
$result=db_query("SELECT * FROM {node_field_instance} fi LEFT JOIN {node_field} f ON fi.field_name=f.field_name WHERE widget_type IN ('options_select', 'options_buttons')");
while($field_instance=db_fetch_array($result)){
...
...
@@ -24,7 +24,7 @@ function optionwidgets_update_1() {
// find all field instances that use the optionwidgets widget
$result=db_query("SELECT DISTINCT f.field_name, f.type, global_settings FROM {node_field} f LEFT JOIN {node_field_instance} fi ON fi.field_name=f.field_name WHERE widget_type IN ('options_select', 'options_buttons') AND type IN ('text', 'number_integer', 'number_decimal')");
...
...
@@ -32,7 +32,7 @@ function optionwidgets_update_1() {
@@ -80,7 +80,7 @@ function optionwidgets_update_1() {
drupal_set_message(t('<div>The allowed values list for %field was not changed from </div><pre>%start</pre>',array('%field'=>$field->field_name,'%start'=>$start_values)));