Changeset 366 for trunk/export/index.php
- Timestamp:
- Mar 9, 2010, 1:01:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/index.php
r365 r366 127 127 if(array_key_exists('ExportId', $_GET)) 128 128 { 129 $DbRows = $Database->SQLCommand('SELECT * FROM Export WHERE Id='.$_GET['ExportId']);129 $DbRows = $Database->SQLCommand('SELECT * FROM `Export` WHERE `Id`='.$_GET['ExportId']); 130 130 if(mysql_num_rows($DbRows) > 0) 131 131 { … … 148 148 if(array_key_exists('sel'.$UserId, $_POST)) $Selected = true; 149 149 else $Selected = false; 150 $Condition = ' WHERE Export='.$_GET['ExportId'].' AND User='.$UserId;151 $DbResult = $Database->SQLCommand('SELECT * FROM ExportUser'.$Condition);150 $Condition = ' WHERE `Export`='.$_GET['ExportId'].' AND `User`='.$UserId; 151 $DbResult = $Database->SQLCommand('SELECT * FROM `ExportUser` '.$Condition); 152 152 if(mysql_num_rows($DbResult) > 0) 153 153 { 154 if(!$Selected) $Database->SQLCommand('DELETE FROM ExportUser'.$Condition);155 else $Database->SQLCommand('UPDATE ExportUser SET Sequence='.$Value.$Condition);154 if(!$Selected) $Database->SQLCommand('DELETE FROM `ExportUser` '.$Condition); 155 else $Database->SQLCommand('UPDATE `ExportUser` SET `Sequence`='.$Value.$Condition); 156 156 } else 157 157 { 158 if($Selected) $Database->SQLCommand('INSERT INTO ExportUser (Export, User, Sequence) VALUES ('.$_GET['ExportId'].', '.$UserId.', '.$Value.')');158 if($Selected) $Database->SQLCommand('INSERT INTO `ExportUser` (`Export`, `User`, `Sequence`) VALUES ('.$_GET['ExportId'].', '.$UserId.', '.$Value.')'); 159 159 } 160 160 } … … 163 163 // Recalculate sequence number 164 164 $Database->SQLCommand('SET @I = 0'); 165 $Database->SQLCommand('UPDATE ExportUser SET Sequence = (@I := @I + 1) WHERE Export='.$_GET['ExportId'].' ORDER BY Sequence;');165 $Database->SQLCommand('UPDATE `ExportUser` SET `Sequence` = (@I := @I + 1) WHERE `Export`='.$_GET['ExportId'].' ORDER BY `Sequence`;'); 166 166 } 167 167 } 168 168 169 169 $TableColumns = array( 170 array('Name' => ' user', 'Title' => 'Jméno'),170 array('Name' => 'Name', 'Title' => 'Jméno'), 171 171 array('Name' => 'TranslatedCount', 'Title' => 'Překladů'), 172 172 array('Name' => 'XP', 'Title' => 'Úroveň'), … … 201 201 echo($Order['Output']); 202 202 203 $Query = 'SELECT * FROM ('.$Query.') AS TX'.$Order['SQL'].$PageList['SQLLimit'];203 $Query = 'SELECT * FROM ('.$Query.') AS `TX` '.$Order['SQL'].$PageList['SQLLimit']; 204 204 $Database->SQLCommand('SET @I = 0'); 205 205 $DbResult = $Database->SQLCommand($Query); … … 396 396 } 397 397 398 $Query = 'SELECT ` group`.*, `ExportGroup`.`Id` AS `ExportGroupId` FROM `group` LEFT JOIN `ExportGroup` ON `ExportGroup`.`Export`='.$_GET['ExportId'].' AND `Group`=`group`.`Id`';398 $Query = 'SELECT `Group`.*, `ExportGroup`.`Id` AS `ExportGroupId` FROM `Group` LEFT JOIN `ExportGroup` ON `ExportGroup`.`Export`='.$_GET['ExportId'].' AND `Group`=`Group`.`Id`'; 399 399 400 400 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM ('.$Query.') AS X'); … … 505 505 $Export = mysql_fetch_assoc($DbResult); 506 506 507 $Query = 'SELECT ` wow_client_version`.* FROM `ExportVersion` LEFT JOIN `wow_client_version` ON `wow_client_version`.`Id`=`ExportVersion`.`ClientVersion` WHERE `ExportType`='.$Export['OutputType'];507 $Query = 'SELECT `ClientVersion`.* FROM `ExportVersion` LEFT JOIN `ClientVersion` ON `ClientVersion`.`Id`=`ExportVersion`.`ClientVersion` WHERE `ExportType`='.$Export['OutputType']; 508 508 509 509 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM ('.$Query.') AS `X`');
Note:
See TracChangeset
for help on using the changeset viewer.