more work on item table optimisation

This commit is contained in:
redmatrix
2015-06-10 16:59:04 -07:00
parent 2128d5a256
commit ca870dbf31
19 changed files with 123 additions and 82 deletions

View File

@@ -9,7 +9,9 @@ function bookmarks_init(&$a) {
$u = $a->get_channel();
$i = q("select * from item where id = %d and uid = %d limit 1",
$item_normal = item_normal();
$i = q("select * from item where id = %d and uid = %d $item_normal limit 1",
intval($item_id),
intval(local_channel())
);
@@ -23,7 +25,7 @@ function bookmarks_init(&$a) {
$terms = get_terms_oftype($item['term'],TERM_BOOKMARK);
if($terms && (! $item['item_restrict'])) {
if($terms) {
require_once('include/bookmarks.php');
$s = q("select * from xchan where xchan_hash = '%s' limit 1",