mirror of https://github.com/BOINC/boinc.git
Web: fix last resort UOTD selection query
The query was failing with the error "Every derived table must have its own alias" thus not selecting a new user of the day.
This commit is contained in:
parent
03ff02596b
commit
fd41262f4f
|
@ -113,7 +113,7 @@ function select_uotd($force_new = false) {
|
|||
// reshow a random one of the 100 least recently shown profiles.
|
||||
//
|
||||
$inner = "SELECT profile.userid FROM profile,user WHERE profile.userid=user.id AND verification=1 AND uotd_time>0 ORDER BY uotd_time ASC LIMIT 100";
|
||||
$result = $db->do_query("SELECT * from ($inner) ORDER BY RAND() LIMIT 1");
|
||||
$result = $db->do_query("SELECT * from ($inner) as t ORDER BY RAND() LIMIT 1");
|
||||
}
|
||||
|
||||
if (!$result || $result->num_rows == 0) {
|
||||
|
|
Loading…
Reference in New Issue