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