Forum OpenACS Development: Response to PgBindCmd turns the empty string into NULL

Collapse
Posted by Tom Jackson on

Yes, that is very understandable. There has to be one value that can't be set directly. It is the same problem I have in a function called obj__set_attrs, that checks if the passed in attribute is null, and if it isn't, it sets the attribute to the passed in value. This means that you can't pass in null and have it work out. So what I did was write a new function called obj__reset_attr which takes the attr name and the object_id and resets the attr to it's default value.