upgrade.php
changeset 279 8acd77a6c19d
parent 228 b0a4d179be85
parent 272 e0ec986c0af3
child 304 e2cb5f1432c8
equal deleted inserted replaced
278:53ba55d33abb 279:8acd77a6c19d
   734       echo 'done!<br />Executing upgrade schema...';
   734       echo 'done!<br />Executing upgrade schema...';
   735       
   735       
   736       // OK, do the loop, baby!!!
   736       // OK, do the loop, baby!!!
   737       foreach($schema as $q)
   737       foreach($schema as $q)
   738       {
   738       {
   739         $r = $db->sql_query($q);
   739         if ( substr($q, 0, 1) == '@' )
   740         if(!$r)
   740         {
   741         {
   741           // if the first character is @, don't fail on error
   742           echo $db->get_error();
   742           $db->sql_query(substr($q, 1));
   743           break 2;
   743         }
       
   744         else
       
   745         {
       
   746           if ( !$db->sql_query($q) )
       
   747           {
       
   748             echo $db->get_error();
       
   749             break 2;
       
   750           }
   744         }
   751         }
   745       }
   752       }
   746       
   753       
   747       // Call any custom functions
   754       // Call any custom functions
   748       foreach ( $installing_versions as $ver )
   755       foreach ( $installing_versions as $ver )