From 891d231bbe4ee4499cf9e62013971b85a0542404 Mon Sep 17 00:00:00 2001 From: Habeas Codice Date: Fri, 23 Jan 2015 17:25:05 -0800 Subject: rand() fixes --- mod/sitelist.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod/sitelist.php') diff --git a/mod/sitelist.php b/mod/sitelist.php index 95cf862df..4e52f0463 100644 --- a/mod/sitelist.php +++ b/mod/sitelist.php @@ -9,8 +9,9 @@ function sitelist_init(&$a) { $sql_order = " order by site_url "; + $rand = db_getfunc('rand'); if($order == 'random') - $sql_order = " order by rand() "; + $sql_order = " order by $rand "; $sql_limit = " limit $start, $limit "; -- cgit v1.2.3 From 1d80bcf2e722508702d21b7a6e03e4eea75137e8 Mon Sep 17 00:00:00 2001 From: Habeas Codice Date: Sat, 24 Jan 2015 21:16:43 -0800 Subject: standardize sql --- mod/sitelist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/sitelist.php') diff --git a/mod/sitelist.php b/mod/sitelist.php index 4e52f0463..95a53c9a4 100644 --- a/mod/sitelist.php +++ b/mod/sitelist.php @@ -13,7 +13,7 @@ function sitelist_init(&$a) { if($order == 'random') $sql_order = " order by $rand "; - $sql_limit = " limit $start, $limit "; + $sql_limit = " LIMIT $limit OFFSET $start "; $sql_extra = ""; if($open) -- cgit v1.2.3