Changeset 365 for trunk/save.php


Ignore:
Timestamp:
Mar 9, 2010, 11:29:05 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Jména tabulek v databází upraveny na stejná s prvními velkými písmeny.
  • Upraveno: Doplněny SQL uvozovky do mnoha SQL dotazů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/save.php

    r357 r365  
    1919    else $complete = 0;
    2020             
    21   $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`Language` = 0) AND (`entry` = '.$entry.')');
     21  $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`Language` = 0) AND (`Entry` = '.$entry.')');
    2222  if(mysql_num_rows($DbResult) == 0) ErrorMessage('Neznámé Id položky');
    2323  $LineAJ = mysql_fetch_array($DbResult);
    2424  $LineTake = mysql_fetch_array($Database->SQLCommand('SELECT `VersionEnd`, `VersionStart` FROM `'.$Table.'` WHERE `ID` = '.$TextID));
    2525  if(mysql_num_rows($DbResult) == 0) ErrorMessage('Neznámé Id položky');
    26   $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`user`='.$UserID.') AND (`entry` = '.$entry.') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')');
     26  $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`User`='.$UserID.') AND (`Entry` = '.$entry.') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')');
    2727  $Line = mysql_fetch_array($DbResult);
    2828  if(!$Line)
     
    6969    while($SameTranLine = mysql_fetch_assoc($SameTranID))
    7070    {
    71       $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`user`='.$UserID.') AND (`entry` = '.$SameTranLine['entry'].') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')'));
     71      $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`User`='.$UserID.') AND (`Entry` = '.$SameTranLine['Entry'].') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')'));
    7272      if(!$Line)
    7373      {
     
    7979            if($Rank_number <> '') $Rank_cur = $Rank.' '.$Rank_number;
    8080              else $Rank_cur = $SameTranLine['Rank'];
    81             $Database->SQLCommand('INSERT INTO `'.$Table.'` (`entry`, '.$Columns.', `Rank`) VALUES ('.$SameTranLine['entry'].','.$Values.',"'.$Rank_cur.'")');
     81            $Database->SQLCommand('INSERT INTO `'.$Table.'` (`Entry`, '.$Columns.', `Rank`) VALUES ('.$SameTranLine['Entry'].','.$Values.',"'.$Rank_cur.'")');
    8282          } else
    8383          {
    84             $Database->SQLCommand('INSERT INTO `'.$Table.'` (`entry`, '.$Columns.') VALUES ('.$SameTranLine['entry'].','.$Values.')');
     84            $Database->SQLCommand('INSERT INTO `'.$Table.'` (`Entry`, '.$Columns.') VALUES ('.$SameTranLine['Entry'].','.$Values.')');
    8585          }
    8686        } else
    8787        {
    88           $Database->SQLCommand('INSERT INTO `'.$Table.'` (`entry`, '.$Columns.', `ShortCut`) VALUES ('.$SameTranLine['entry'].','.$Values.',"'.$SameTranLine['ShortCut'].'")');
     88          $Database->SQLCommand('INSERT INTO `'.$Table.'` (`Entry`, '.$Columns.', `ShortCut`) VALUES ('.$SameTranLine['Entry'].','.$Values.',"'.$SameTranLine['ShortCut'].'")');
    8989        }
    9090        $LastIDs[] = mysql_insert_id();
     
    119119  $next = FollowingTran($TextID, $Table, $GroupId);
    120120  echo('<br /><br />');
    121   $redirecting = mysql_fetch_assoc($Database->SQLCommand('SELECT `redirecting` FROM `user` WHERE `ID`='.$UserID));
     121  $redirecting = mysql_fetch_assoc($Database->SQLCommand('SELECT `Redirecting` FROM `User` WHERE `ID`='.$UserID));
    122122   
    123123  switch($redirecting['redirecting'])
     
    145145   
    146146  // Aktualizace informace o nutnosti načíst XP
    147   $Database->SQLCommand('UPDATE `user` SET `NeedUpdate` = 1 WHERE `ID` = '.$UserID);
     147  $Database->SQLCommand('UPDATE `User` SET `NeedUpdate` = 1 WHERE `ID` = '.$UserID);
    148148} else
    149149{
Note: See TracChangeset for help on using the changeset viewer.