Changeset 817 for trunk/Modules/Import/Import.php
- Timestamp:
- Feb 23, 2015, 12:03:22 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Import/Import.php
r816 r817 54 54 // $Values .= ', "'.$Value[$GroupItem['Column']].'"'; 55 55 } 56 // echo $Values;57 56 $Columns = substr($Columns, 1); 58 57 $Where = ' (`'.$this->Group['PrimaryKeyItem'].'` = "'.$Value[$this->Group['PrimaryKeyItem']].'") AND (`Language`=0) ' ; 59 //print_r($Value);60 58 61 59 $DbResultMiddle = $this->System->Database->query('SELECT `VersionEnd`,`VersionStart`, `ID`, `Entry`, '.$Columns.' FROM `'.$this->Group['TablePrefix'].'` WHERE '.$Where.' AND `VersionStart` <= '.$this->Version['BuildNumber'].' AND `VersionEnd` >= '.$this->Version['BuildNumber'].' ORDER BY `VersionEnd` DESC LIMIT 1'); 62 60 $DbResultBefore = $this->System->Database->query('SELECT `VersionEnd`,`VersionStart`, `ID`, `Entry`, '.$Columns.' FROM `'.$this->Group['TablePrefix'].'` WHERE '.$Where.' AND `VersionEnd` <= '.$this->Version['BuildNumber'].' ORDER BY `VersionEnd` DESC LIMIT 1'); 63 61 $DbResultAfter = $this->System->Database->query('SELECT `VersionEnd`,`VersionStart`, `ID`, `Entry`, '.$Columns.' FROM `'.$this->Group['TablePrefix'].'` WHERE '.$Where.' AND `VersionStart` >= '.$this->Version['BuildNumber'].' ORDER BY `VersionStart` LIMIT 1'); 64 //echo('SELECT `VersionEnd`, `ID`, `Entry`, '.$Columns.' FROM `'.$this->Group['TablePrefix'].'` WHERE '.$Where.' AND (`Language`=0) ORDER BY `VersionStart` DESC LIMIT 1'); 62 65 63 if(($DbResultMiddle->num_rows > 0) or ($DbResultBefore->num_rows > 0) or ($DbResultAfter->num_rows > 0)) 66 64 { … … 223 221 $Line = substr($Line, strpos($Line, ';') + 1); 224 222 $Value['Comment'] = addslashes(stripslashes(substr($Line, 3))); // Skip " --" 225 //print_r($Value);226 223 227 224 $this->InsertItem($Value); … … 260 257 while($DbRow = $DbResult->fetch_assoc()) 261 258 { 262 echo '`';259 echo('`'); 263 260 $this->System->Database->query('UPDATE `'.$Group['TablePrefix'].'` SET `VersionEnd` = '.$DbRow['VersionEnd_orig'].', `VersionStart` = '.$DbRow['VersionStart_orig'].' WHERE `ID` = '.$DbRow['ID']); 264 261 $Output .= '. ';
Note:
See TracChangeset
for help on using the changeset viewer.