Changeset 447 for trunk/Common/Types/OneToMany.php
- Timestamp:
- Oct 16, 2012, 8:26:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Types/OneToMany.php
r442 r447 26 26 if(array_key_exists('Condition', $Type['Parameters'])) $Where = ' WHERE '.$Type['Parameters']['Condition']; 27 27 else $Where = ''; 28 print_r($Item); 29 if(array_key_exists('Null', $Item) and $Item['Null']) 30 { 31 if($Item['Value'] == NULL) $Selected = ' selected="1"'; else $Selected = ''; 32 $Output .= '<option value=""'.$Selected.'></option>'; 33 } 28 34 $DbResult = $this->System->Database->query('SELECT '.$Type['Parameters']['Name'].' AS `Name`,'.$Type['Parameters']['Id'].' AS `Id` FROM `'.$Type['Parameters']['Table'].'`'.$Where.' ORDER BY `Name`'); 29 35 while($DbRow = $DbResult->fetch_assoc()) … … 38 44 function OnLoad($Item) 39 45 { 40 return($_POST[$Item['Name']]); 46 if($_POST[$Item['Name']] == '') return(NULL); 47 else return($_POST[$Item['Name']]); 48 } 49 50 function OnLoadDb($Item) 51 { 52 if($Item['Value'] == '') return(NULL); 53 else return($Item['Value']); 41 54 } 42 55 }
Note:
See TracChangeset
for help on using the changeset viewer.