Index

(misc)

o2pre

mix o2pre(string $view_name, string $field_name)

Returns previous value of the requested field of a view, as red from database, before any update operation.
The view must be defined in the program where o2pre() is used and the field must be a field defined in that view.

ATTENTION: No previous value is defined for program and application (session) variables.

If returned value is an array, indexed subvalues can be retrieved passing indexes as supplementary parameters. For example if you have:
o2pre("view", "field") = array(1 => array("c" => "previous"))
you can get "previous" directly by calling:
o2pre("view", "field", 1, "c")


Parameters:
  1. $view_name
  2. Name of the db-view
  3. $field_name
  4. Name of the field
Related functions:

o2val

o2zero

o2par

o2format