Forum OpenACS Q&A: Re: ad_form and getting around postgres

Collapse
Posted by Jade Rubick on
Oops, I put the wrong statement in for update. It still doesn't work:

} -new_data {

    db_exec_plsql new_brand { }
    db_dml brand_update {
      update brand
      set name                = :name,
          notes              = :notes,
      display_name        = :display_name,
          status              = :status,
          tm_first_used      = to_timestamp(:tm_first_used,'YYYY MM DD HH24 MI SS'),
          tm_applied          = to_timestamp(:tm_applied,'YYYY MM DD HH24 MI SS'),
          tm_issued          = to_timestamp(:tm_issued,'YYYY MM DD HH24 MI SS'),
          tm_renewal          = to_timestamp(:tm_renewal,'YYYY MM DD HH24 MI SS'),
          registration_type  = :registration_type,
          bread_p            = :bread_p,
          bread_mixes_p      = :bread_mixes_p,
          cookies_p          = :cookies_p,
          crackers_p          = :crackers_p,
          other_p            = :other_p,
          application_type    = :application_type,
          registration_number = :registration_number,
          sect_8_15_renewal  = to_timestamp(:sect_8_15_renewal,'YYYY MM DD HH24 MI SS'),
          ibr_p              = :ibr_p
      where brand_id = :brand_id
    }

    ad_returnredirect "."
    ad_script_abort

}