CURRENT_DATABASE_VERSION){ // We need updates! if(CURRENT_DATABASE_VERSION == '0.0.1'){ // Insert queries here required to update to DB version 0.0.2 // mysqli_query($mysqli, "ALTER TABLE ....."); // Then, update the database to the next sequential version //mysqli_query($mysqli, "UPDATE settings SET config_current_database_version = '0.0.2' WHERE company_id = '1'"); } if(CURRENT_DATABASE_VERSION == '0.0.2'){ // Insert queries here required to update to DB version 0.0.3 // mysqli_query($mysqli, "ALTER TABLE ....."); // Then, update the database to the next sequential version //mysqli_query($mysqli, "UPDATE settings SET config_current_database_version = '0.0.3' WHERE company_id = '1'"); } // etc } else{ // Up-to-date }