Permalink
Browse files

Feature comparision was not changed for the new result bitfields

  • Loading branch information...
1 parent dc40208 commit 6cc39627aa4aef4ed255b10ac5aef2e1f507804e @NielsLeenheer NielsLeenheer committed Nov 19, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 backend/models/results.php
@@ -9,7 +9,8 @@ function getByFeature($id, $version) {
$res = mysql_query("
SELECT
- IF(f.results LIKE '%" . mysql_real_escape_string($id) . "=1%',1,IF(f.results LIKE '%" . mysql_real_escape_string($id) . "=-1%',-1,0)) AS supported, b.variant, IFNULL(b.version,'') AS version
+ IFNULL(SUBSTRING_INDEX(SUBSTRING_INDEX(f.results,'" . mysql_real_escape_string($id) . "=',-1),',',1),0) as supported,
+ b.variant, IFNULL(b.version,'') AS version
FROM
browserVersions AS b
LEFT JOIN scores AS s ON (b.variant = s.variant AND (b.version = s.version OR (b.version IS NULL AND s.version IS NULL)))

0 comments on commit 6cc3962

Please sign in to comment.