upgrade.php
changeset 218 e0ec986c0af3
parent 184 54b3e14bf19d
child 232 2b60c89dc27f
equal deleted inserted replaced
217:5bcdee999015 218:e0ec986c0af3
   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 )