|
Previous Page |
Solar_Example_Model_Metas_Record |
Next Page |
isChanged()
Tells if a particular table-column has changed.
Inherited from Solar_Sql_Model_Record.
Parameters
- (string)
$col: The table-column name.
Returns
- (void|bool) Returns null if the table-column name does not exist, boolean true if the data is changed, boolean false if not changed.
Description
Tells if a particular table-column has changed.
This is slightly complicated. Changes to or from a null are reported as "changed". If both the initial value and new value are numeric (that is, whether they are string/float/int), they are compared using normal inequality (!=). Otherwise, the initial value and new value are compared using strict inequality (!==).
This complexity results from converting string and numeric values in and out of the database. Coming from the database, a string numeric '1' might be filtered to an integer 1 at some point, making it look like the value was changed when in practice it has not.
Similarly, we need to make allowances for nulls, because a non-numeric null is loosely equal to zero or an empty string.
Local
- Overview
- Constants
- Properties
- Methods
- __construct()
- __destruct()
- __get()
- __isset()
- __set()
- __unset()
- _checkDeleted()
- _exception()
- _insert()
- _postDelete()
- _postFilter()
- _postInsert()
- _postSave()
- _postSaveRelated()
- _postUpdate()
- _preDelete()
- _preFilter()
- _preInsert()
- _preSave()
- _preSaveRelated()
- _preUpdate()
- _save()
- _saveRelated()
- _update()
- addFilter()
- apiVersion()
- count()
- current()
- delete()
- dump()
- filter()
- form()
- getChanged()
- getInvalid()
- getModel()
- getPrimaryCol()
- getPrimaryVal()
- getSaveException()
- getStatus()
- increment()
- isChanged()
- key()
- load()
- locale()
- next()
- offsetExists()
- offsetGet()
- offsetSet()
- offsetUnset()
- refresh()
- rewind()
- save()
- saveInTransaction()
- setInvalid()
- setInvalids()
- setModel()
- setStatus()
- toArray()
- valid()