Basic Understanding Of Computed Field
| Project: | Computed Field |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | GreenLED |
| Status: | by design |
Jump to:
I need to understand some of the basics of using the computed field in cck. It has me stumped. I tried plugging in the code listed on the field download page, but got nowhere. I just keep getting mysql syntax errors. Here's one of them.
<li>user warning: Unknown column 'field_duration_value' in 'field list' query: UPDATE content_type_stub SET field_duration_value = -0.0333333333333 WHERE vid = 11 AND nid = 11 in /home/handy7/public_html/errordb/includes/database.mysql.inc on line 172.
<li>user warning: Unknown column 'field_duration_value' in 'field list' query: SELECT field_duration_value AS value FROM content_type_stub WHERE vid = 11 LIMIT 0, 1 in /home/handy7/public_html/errordb/includes/database.mysql.inc on line 172. Here's the setup I have going...
First field named "field_start_time"
Second field named "field_end_time"
Both are "Date > Textbox" types.
Both have "g:i" as a custom php date format.
Third field named "field_duration"
This is a "Computed Field" with all the settings
specified on the computed field download page.
Can someone start asking me some questions or
maybe some answer as to why this would not work?
I would like maybe even a more simple computed field
example just to get the hang of the syntax. Hopefully
there aren't bugs that are preventing me from getting this
to work -- then I'll really be confused... Anyhow, please
help me here.

#1
From the error, it looks like the duration field does not exist in the database.
Try using some of the other examples here, http://drupal.org/node/149228
#2
This field still doesn't make sense to me. I think the interface needs to maybe include some sort of widgets that allow you to input your desired actions as well as allow you to manually type in code.
» Respectfully, GreenLED
»
#3
See this page for Computed Field examples, http://drupal.org/node/149228
This module is intended to be used by PHP developers to insert & execute code. Not to provide a macro interface, helpers, GUI or anything other than a 'insert your working code here' text area.