Skip to content

Commit

Permalink
Got rid of some more bloat.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Nov 30, 2010
1 parent ac20c65 commit 249a2f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions shorten-url.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ function getNextShortURL($s) {

$result = $db->query('SELECT `slug` FROM `redirect` WHERE `url` = "' . $url . '" LIMIT 1');
if ($result && $result->num_rows > 0) { // If there’s already a short URL for this URL
$item = $result->fetch_object();
echo SHORT_URL . $item->slug;
die();
die(SHORT_URL . $result->fetch_object()->slug);
} else {
$result = $db->query('SELECT `slug`, `url` FROM `redirect` ORDER BY `date` DESC LIMIT 1');
if ($result && $result->num_rows > 0) {
Expand Down

0 comments on commit 249a2f6

Please sign in to comment.