Changeset 366 for trunk/import/import_lua.php
- Timestamp:
- Mar 9, 2010, 1:01:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/import/import_lua.php
r363 r366 35 35 $Columns = substr($Columns, 1); 36 36 37 $DbResult2 = $Database->SQLCommand('SELECT `VersionEnd`, `ID`, ` entry`, '.$Columns.' FROM '.$Group['TablePrefix'].'WHERE `ShortCut`="'.$Value['ShortCut'].'" AND (`Language`=0) ORDER BY `VersionStart` DESC LIMIT 1');37 $DbResult2 = $Database->SQLCommand('SELECT `VersionEnd`, `ID`, `Entry`, '.$Columns.' FROM `'.$Group['TablePrefix'].'` WHERE `ShortCut`="'.$Value['ShortCut'].'" AND (`Language`=0) ORDER BY `VersionStart` DESC LIMIT 1'); 38 38 if(isset($DbResult2) and (mysql_num_rows($DbResult2) > 0)) 39 39 { … … 50 50 } else 51 51 { 52 $Columns = '` entry`, `language`, `VersionStart`, `VersionEnd`';53 $Values = $DbRow2[' entry'].', 0, '.$BuildNumber.', '.$BuildNumber;52 $Columns = '`Entry`, `Language`, `VersionStart`, `VersionEnd`'; 53 $Values = $DbRow2['Entry'].', 0, '.$BuildNumber.', '.$BuildNumber; 54 54 foreach($Group['Items'] as $GroupItem) 55 55 { … … 59 59 $Database->SQLCommand('INSERT `'.$Group['TablePrefix'].'` ('.$Columns.') VALUES ('.$Values.')'); 60 60 echo('# '); 61 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.mysql_insert_id().'">'.mysql_insert_id().'</a> ('.$DbRow2[' entry'].') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' změněn.', LOG_TYPE_IMPORT);61 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.mysql_insert_id().'">'.mysql_insert_id().'</a> ('.$DbRow2['Entry'].') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' změněn.', LOG_TYPE_IMPORT); 62 62 } 63 63 } else … … 65 65 // Insert new text 66 66 $Entry = 1; 67 $DbResult = $Database->SQLCommand('SELECT MAX(` entry`) FROM `'.$Group['TablePrefix'].'`');67 $DbResult = $Database->SQLCommand('SELECT MAX(`Entry`) FROM `'.$Group['TablePrefix'].'`'); 68 68 if(mysql_num_rows($DbResult) > 0) 69 69 { … … 71 71 $Entry += $DbRow[0]; 72 72 } 73 $Columns = '` entry`, `language`, `VersionStart`, `VersionEnd`';73 $Columns = '`Entry`, `Language`, `VersionStart`, `VersionEnd`'; 74 74 $Values = $Entry.', 0, '.$BuildNumber.', '.$BuildNumber; 75 75 foreach($Group['Items'] as $GroupItem) … … 87 87 } 88 88 echo('<br />Celkem: '.$Count.' Nových: '.$NewCount.'<br />'); 89 $Database->SQLCommand('UPDATE ` group` SET LastVersion = "'.$BuildNumber.'", LastImport = NOW() WHERE Id='.$Group['Id']);89 $Database->SQLCommand('UPDATE `Group` SET `LastVersion` = "'.$BuildNumber.'", `LastImport` = NOW() WHERE `Id`='.$Group['Id']); 90 90 } 91 91 }
Note:
See TracChangeset
for help on using the changeset viewer.