v5:userguide:learn_abstraction:using_execute
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| v5:userguide:learn_abstraction:using_execute [2016/03/15 17:44] – [Reading Data] review dregad | v5:userguide:learn_abstraction:using_execute [2020/01/02 12:03] (current) – ↷ Links adapted because of a move operation dregad | ||
|---|---|---|---|
| Line 43: | Line 43: | ||
| ^Command^Description| | ^Command^Description| | ||
| | [[v5: | | [[v5: | ||
| - | | [[v5: | + | | [[v5: |
| | [[v5: | | [[v5: | ||
| - | | [[v5: | + | | [[v5: |
| ===== Writing Data ===== | ===== Writing Data ===== | ||
| Line 80: | Line 80: | ||
| $result = $db-> | $result = $db-> | ||
| </ | </ | ||
| + | |||
| + | ===== Creating A Recordset Filter ===== | ||
| + | |||
| + | A recordset filter pre-processes all the rows in a recordset after retrieval but before we use it. For example, we want to apply the PHP function // | ||
| + | |||
| + | In order to apply the filter, we must include the extra file **rsfilter.inc.php** | ||
| + | |||
| + | <code php> | ||
| + | |||
| + | include_once ' | ||
| + | include_once ' | ||
| + | |||
| + | /* | ||
| + | * ucwords() every element in the recordset | ||
| + | */ | ||
| + | function doUcwords(& | ||
| + | { | ||
| + | | ||
| + | $arr[$k] = ucwords($v); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | $db = newADOConnection(' | ||
| + | $db-> | ||
| + | |||
| + | $rs = $db-> | ||
| + | $rs = rsFilter($rs,' | ||
| + | </ | ||
| + | |||
| + | The [[v5: | ||
v5/userguide/learn_abstraction/using_execute.1458060263.txt.gz · Last modified: (external edit)
