require "../../menu/menucp.php" ?>
require "../../inc/dbconn.php";
$searchby="";
$searchon="";
$criteria="";
$REMOTE_ADDR="";
$HTTP_USER_AGENT="";
$sqlpeak="";
$displayblock="";
$displayblockc="";
$sql = "select * from chtsingles;";
$resultcount = mysql_query($sql) or die ("Couldn't execute query - count");
$num_rows = mysql_num_rows($resultcount);
if ($num_rows <= 33500) {
$displayblockc= "
Database is being updated, please try again shortly.
Currently uploaded $num_rows chartruns
";
echo $displayblockc ;
}
else
{ ?>
//error_reporting(-1);
//ini_set('display_errors', 'On');
if (isset($_POST['criteria'])) {
$searchby="$_POST[searchby]";
$searchon="$_POST[searchon]";
$criteria="$_POST[criteria]";
$crit = $criteria;}
else {
$crit = "" ;
}
?>
|
|
} ?>
if (isset($_POST["criteria"])) {
require "../../inc/dbconn.php";
$searchby="$_POST[searchby]";
$searchon="$_POST[searchon]";
$criteria="$_POST[criteria]";
$REMOTE_ADDR="$_SERVER[REMOTE_ADDR]";
$HTTP_USER_AGENT="$_SERVER[HTTP_USER_AGENT]";
$audtime = date("d/m/Y H:i:s");
$criteriax = str_replace("'","''",$criteria);
$sql = "INSERT INTO audit (function, description, searchby, searchon, audtime, IP, Browser) values ('ChartRuns', '$criteriax', '$searchby', '$searchon', '$audtime', '$REMOTE_ADDR', '$HTTP_USER_AGENT');";
$result = mysql_query($sql) or die ("Couldn't execute query - insert audit");
$criteria = mysql_real_escape_string("$criteria");
if ($searchby == "artist") {
if ($searchon == "exact") {
$sqlpeak = "SELECT date_format(EnteredWE, '%d/%m/%Y') as EnteredCht, EnteredWE, Artist, Song, Peak, TotWeeks, ChartRun, AmazonASIN, TitleID, ArtistID from chtsingles where Artist= '$criteria' order by EnteredWE LIMIT 200;";
} elseif ($searchon == "anypart") {
$sqlpeak = "SELECT date_format(EnteredWE, '%d/%m/%Y') as EnteredCht, EnteredWE, Artist, Song, Peak, TotWeeks, ChartRun, AmazonASIN, TitleID, ArtistID from chtsingles where Artist like '%$criteria%' order by EnteredWE LIMIT 200;";
} elseif ($searchon == "start") {
$sqlpeak = "SELECT date_format(EnteredWE, '%d/%m/%Y') as EnteredCht, EnteredWE, Artist, Song, Peak, TotWeeks, ChartRun, AmazonASIN, TitleID, ArtistID from chtsingles where Artist like '$criteria%' order by EnteredWE LIMIT 200;";
}
} elseif ($searchby == "song") {
if ($searchon == "exact") {
$sqlpeak = "SELECT date_format(EnteredWE, '%d/%m/%Y') as EnteredCht, EnteredWE, Artist, Song, Peak, TotWeeks, ChartRun, AmazonASIN, TitleID, ArtistID from chtsingles where Song = '$criteria' order by EnteredWE LIMIT 200;";
} elseif ($searchon == "anypart") {
$sqlpeak = "SELECT date_format(EnteredWE, '%d/%m/%Y') as EnteredCht, EnteredWE, Artist, Song, Peak, TotWeeks, ChartRun, AmazonASIN, TitleID, ArtistID from chtsingles where Song like '%$criteria%' order by EnteredWE LIMIT 200;";
} elseif ($searchon == "start") {
$sqlpeak = "SELECT date_format(EnteredWE, '%d/%m/%Y') as EnteredCht, EnteredWE, Artist, Song, Peak, TotWeeks, ChartRun, AmazonASIN, TitleID, ArtistID from chtsingles where Song like '$criteria%' order by EnteredWE LIMIT 200;";
}
}
//echo $sqlpeak;
$resultpeak = mysql_query($sqlpeak) or die(mysql_error());
$i = 1;
$resultcount = mysql_num_rows($resultpeak);
if ($resultcount < 1) {
$displayblock .= "
No records found....
";
} else {
while ($row = mysql_fetch_array($resultpeak)) {
$bgcolor = ($i++ % 2) ? '#ffffff' : '#e0e0e0';
$enteredchart = $row['EnteredCht'];
$titleid = $row['TitleID'];
$artistid = $row['ArtistID'];
$artist = $row['Artist'];
$song = $row['Song'];
$peak = $row['Peak'];
$totweeks = $row['TotWeeks'];
$chartrun = $row['ChartRun'];
$AmazonASIN = $row['AmazonASIN'];
if (strlen($row['AmazonASIN']) > 1) {
$AmazonLink = "
"; }
else {
$AmazonLink = "
";
}
$displayblock .= "
$AmazonLink |
$enteredchart |
$artist |
$song |
$peak |
$chartrun |
";
}
}
?>
|
Entered Chart |
Artist |
Song |
Peak |
ChartRun {Peak} |
echo $displayblock ?>
= link to single on Amazon
How to read the chart runs:
All positions are separated with a hyphen
R denotes a re-entry, so 40R(2) means a re-entry at position 40,
with a two week gap between the dates
The number of weeks on the chart follows the final position listed
If you find any inconsistencies in the data
please let me know.
require "../../inc/footer.php" ?>
} else { ?>
Top 10 searches
in the last 6 months:
|
Ed Sheeran
Madonna
Sam Smith
Rihanna
Taylor Swift
Sia
One Direction
Hozier
Beyonce
Calvin Harris
|
(as at 04/06/2015)
Some tips for searching:
- '&' has been replaced with 'And' except for a few artists - eg C&C Music Factory
- Case does not matter - so A-HA is the same as a-ha
- Titles with curly braces - e.g. Rock Around The Clock {1968} - are re-releases by the same artist and not a new recording, or a download only run.
A remix release of a song will be indicated as such in the title.
Sheet music chart runs pre-November 1952 have been removed
from
the database, and are available for searching here.