diff options
author | Friendika <info@friendika.com> | 2011-07-05 23:23:43 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-07-05 23:23:43 -0700 |
commit | 84d12c3e08ae4b6fe228ce881b0c1570175d1667 (patch) | |
tree | bb8f4ccca207ff6c226cf79f4ce348c5bc8d9df9 /mod/msearch.php | |
parent | c221d5ea597040c27a8918f9c08629e979a6e273 (diff) | |
download | volse-hubzilla-84d12c3e08ae4b6fe228ce881b0c1570175d1667.tar.gz volse-hubzilla-84d12c3e08ae4b6fe228ce881b0c1570175d1667.tar.bz2 volse-hubzilla-84d12c3e08ae4b6fe228ce881b0c1570175d1667.zip |
move hidewall to user table - queries are getting too complicated and servers falling over
Diffstat (limited to 'mod/msearch.php')
-rw-r--r-- | mod/msearch.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/msearch.php b/mod/msearch.php index 7d9bbe9e7..94def7d89 100644 --- a/mod/msearch.php +++ b/mod/msearch.php @@ -10,13 +10,13 @@ function msearch_post(&$a) { if(! strlen($search)) killme(); - $r = q("SELECT COUNT(*) AS `total` FROM `profile` WHERE `is-default` = 1 AND `hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') ", + $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `user`.`hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') ", dbesc($search) ); if(count($r)) $total = $r[0]['total']; - $r = q("SELECT `pub_keywords`, `username`, `nickname`, `user`.`uid` FROM `user` LEFT JOIN `profile` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') LIMIT %d , %d ", + $r = q("SELECT `pub_keywords`, `username`, `nickname`, `user`.`uid` FROM `user` LEFT JOIN `profile` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `user`.`hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') LIMIT %d , %d ", dbesc($search), intval($startrec), intval($perpage) |