Changeset 2421

Show
Ignore:
Timestamp:
04/04/08 14:19:34 (5 months ago)
Author:
Shadowhand
Message:

Minor tweaks to PDODB and PDO_Model

Location:
trunk/modules/pdomo
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/pdomo/libraries/PDODB.php

    r2419 r2421  
    6868     * @return  string 
    6969     */ 
    70     public function where($key, $op, $value = NULL) 
     70    public function where($key, $op, $value = '{WHERE_VALUE_DEFAULT}') 
    7171    { 
    72         if ($value === NULL) 
     72        if ($value === '{WHERE_VALUE_DEFAULT}') 
    7373        { 
    7474            // Use the operator as the value 
  • trunk/modules/pdomo/models/pdo.php

    r2420 r2421  
    277277            // Object is loaded and saved 
    278278            $this->loaded = $this->saved = TRUE; 
     279 
     280            // Execute the on_load event 
     281            $this->__on_load(); 
    279282        } 
    280283        else 
     
    335338    public function find($key, $op = '######', $value = '######') 
    336339    { 
    337         if ($value === '######') 
     340        if ($key === TRUE) 
     341        { 
     342            // Reload the current record 
     343            $key = $this->primary_key; 
     344            $op = '='; 
     345            $value = $this->data[$this->primary_key]; 
     346        } 
     347        elseif ($value === '######') 
    338348        { 
    339349            if ($op === '######')