Alert failed database selection in build-base.php

Previously this would continue and subsequent queries would fail
verbosely
This commit is contained in:
Thom Seddon
2015-05-18 20:12:52 +01:00
parent eebf52061d
commit 7508f58f7b

View File

@ -20,7 +20,11 @@ if ($connection === FALSE) {
exit(1);
}
mysql_select_db( $config['db_name'] );
$select = mysql_select_db( $config['db_name'] );
if ($select === FALSE) {
echo( "ERROR: Cannot select database: " . mysql_error() . "\n" );
exit(1);
}
while( !feof( $sql_fh ) ) {
$line = fgetss( $sql_fh );