mirror of
https://github.com/friendica/friendica
synced 2025-04-27 06:30:12 +00:00
New indexes for the API
This commit is contained in:
parent
4f07dfb35a
commit
8bf7db06db
8 changed files with 24 additions and 17 deletions
|
@ -631,11 +631,11 @@ function posts_from_contact($a, $contact_id) {
|
|||
$r = q("SELECT `item`.`uri`, `item`.*, `item`.`id` AS `item_id`,
|
||||
`author-name` AS `name`, `owner-avatar` AS `photo`,
|
||||
`owner-link` AS `url`, `owner-avatar` AS `thumb`
|
||||
FROM `item` FORCE INDEX (`uid_contactid_created`)
|
||||
FROM `item` FORCE INDEX (`uid_contactid_id`)
|
||||
WHERE `item`.`uid` = %d AND `contact-id` = %d
|
||||
AND `author-link` IN ('%s', '%s')
|
||||
AND NOT `deleted` AND NOT `moderated` AND `visible`
|
||||
ORDER BY `item`.`created` DESC LIMIT %d, %d",
|
||||
ORDER BY `item`.`id` DESC LIMIT %d, %d",
|
||||
intval(local_user()),
|
||||
intval($contact_id),
|
||||
dbesc(str_replace("https://", "http://", $contact["url"])),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue