aboutsummaryrefslogtreecommitdiff
path: root/mostviewedimages.php
diff options
context:
space:
mode:
Diffstat (limited to 'mostviewedimages.php')
-rw-r--r--mostviewedimages.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/mostviewedimages.php b/mostviewedimages.php
index caf755193..8831dc33e 100644
--- a/mostviewedimages.php
+++ b/mostviewedimages.php
@@ -17,7 +17,7 @@
$sql = "select md.entity_guid, md.owner_guid, md.enabled, ms.string as views from " . $prefix . "metadata md
inner join " . $prefix . "metastrings ms on md.value_id = ms.id
inner join " . $prefix . "metastrings ms2 on md.name_id = ms2.id and ms2.string = 'tp_views'
- order by views desc LIMIT $max";
+ order by (views+0) desc LIMIT $max";
$result = get_data($sql);