Changeset 1401

Show
Ignore:
Timestamp:
09/06/09 11:03:53 (11 months ago)
Author:
arnoschn
Message:

fixing IN ? bug in findBy queries, fixing bind warning in associated finder

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/AkActiveRecord.php

    r1399 r1401  
    13291329                                $values = join(', ', $this->castAttributesForDatabase($_tmp_parts[0], $query_values[$parameter_count])); 
    13301330                                if(!empty($values)){ 
    1331                                     $new_sql .= $_tmp_parts[0].' IN ('.$values.')'; 
     1331                                    $new_sql .= $_tmp_parts[0].' IN ('.$values.') '; 
    13321332                                }else{ 
    13331333                                    $new_sql = preg_replace('/(AND|OR) $/','', $new_sql); 
  • trunk/lib/AkActiveRecord/AkAssociatedActiveRecord.php

    r1399 r1401  
    394394                    $separator, $values); 
    395395                } else if ($option=='bind') { 
     396                    if(!isset($options [$option])) { 
     397                        $options [$option]=array(); 
     398                    } 
    396399                    $options [$option] = array_merge($options [$option],$values); 
    397400                } 
     
    581584        $owner = array(); 
    582585        $keys = array(); 
     586        $record_counter=0; 
    583587        while ($record = $results->FetchRow()) { 
     588            $record_counter++; 
    584589            /** 
    585590             * implement limits here, config should have limits per association