Skip to content
This repository has been archived by the owner on Jun 24, 2018. It is now read-only.

Commit

Permalink
can't do backticks an asterisk in SQL apparently
Browse files Browse the repository at this point in the history
  • Loading branch information
ericoc committed May 18, 2014
1 parent b94d653 commit 4d9a688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/index.php
Expand Up @@ -194,7 +194,7 @@ function howmanyVisits ($id) {
if (!isset($listurls)) {

if ($sortby == 'visits') {
$listurls = $link->prepare("SELECT `urls`.`*`, count(`visits`.`id`) AS `visitors` FROM `urls` INNER JOIN `visits` ON `visits`.`id` = `urls`.`id` GROUP BY `visits`.`id` ORDER BY `visitors` $sorthow LIMIT $limit");
$listurls = $link->prepare("SELECT `urls`.*, count(`visits`.`id`) AS `visitors` FROM `urls` INNER JOIN `visits` ON `visits`.`id` = `urls`.`id` GROUP BY `visits`.`id` ORDER BY `visitors` $sorthow LIMIT $limit");
} else {
$listurls = $link->prepare("SELECT * FROM `urls` ORDER BY `$sortby` $sorthow LIMIT $limit");
}
Expand Down

0 comments on commit 4d9a688

Please sign in to comment.