Connect(
$config['sql']['hostname'],
$config['sql']['username'],
$config['sql']['password']
);
$db->Select_db($config['sql']['database']);
if ($action == "updateReelOrder"){
$listingCounter = 1;
foreach ($updateRecordsArray as $recordIDValue) {
$db->Query("UPDATE `bayonet_newsreel` SET `weight` = '$listingCounter' WHERE `slide_id` = '$recordIDValue'");
$listingCounter = $listingCounter + 1;
}
echo "";
/*
echo '
'; print_r($updateRecordsArray); echo ''; echo 'If you refresh the page, you will see that records will stay just as you modified.'; */ } else{ echo "