We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit b106034b authored by mattl's avatar mattl

up the limit to 100

parent 8399045f
......@@ -42,25 +42,25 @@ $req_track = $_GET["t"];
if ($req_user) {
$res = $mdb2->query("SELECT username, artist, track, time FROM Scrobbles WHERE username = '" . $req_user . "' ORDER BY time DESC LIMIT 10");
$res = $mdb2->query("SELECT username, artist, track, time FROM Scrobbles WHERE username = '" . $req_user . "' ORDER BY time DESC LIMIT 100");
echo "<h2>Last 10 Gobbles by " . $req_user . "</h2>";
} elseif ($req_artist) {
$res = $mdb2->query("SELECT username, artist, track, time FROM Scrobbles WHERE artist = '" . $req_artist ."' ORDER BY time DESC LIMIT 10");
$res = $mdb2->query("SELECT username, artist, track, time FROM Scrobbles WHERE artist = '" . $req_artist ."' ORDER BY time DESC LIMIT 100");
echo "<h2>Last 10 Gobbles of " . $req_artist . "</h2>";
} elseif ($req_track) {
$res = $mdb2->query("SELECT username, artist, track, time FROM Scrobbles WHERE track = '" . $req_track . "' ORDER BY time DESC LIMIT 10");
$res = $mdb2->query("SELECT username, artist, track, time FROM Scrobbles WHERE track = '" . $req_track . "' ORDER BY time DESC LIMIT 100");
echo "<h2>Last 10 Gobbles of " . $req_track . "</h2>";
} elseif (!$res) {
$res = $mdb2->query("SELECT username, artist, track, time FROM Scrobbles ORDER BY time DESC LIMIT 10");
$res = $mdb2->query("SELECT username, artist, track, time FROM Scrobbles ORDER BY time DESC LIMIT 100");
echo "<h2>Last 10 Gobbles</h2>";
......@@ -70,7 +70,7 @@ if ($req_user) {
<table>
<tr><th>User</th><th>Artist</th><th>Track</th><th>Time</th></tr>
<?php
if(PEAR::isError($res)) {
......@@ -95,7 +95,7 @@ if ($req_user) {
<h2>Now Playing?</h2>
<?php
$res = $mdb2->query("SELECT username, artist, track FROM Now_Playing ORDER BY expires DESC LIMIT 10");
$res = $mdb2->query("SELECT username, artist, track FROM Now_Playing ORDER BY expires DESC LIMIT 100");
if(PEAR::isError($res)) {
die($res->getMessage());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment