mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Backlink count at the doc block title including sub-blocks https://github.com/siyuan-note/siyuan/issues/13791
This commit is contained in:
parent
632dcd08f3
commit
28df28a37e
1 changed files with 2 additions and 2 deletions
|
|
@ -362,9 +362,9 @@ func QueryRefIDsByDefID(defID string, containChildren bool) (refIDs []string) {
|
|||
var rows *sql.Rows
|
||||
var err error
|
||||
if containChildren {
|
||||
rows, err = query("SELECT block_id FROM refs WHERE def_block_root_id = ?", defID)
|
||||
rows, err = query("SELECT DISTINCT block_id FROM refs WHERE def_block_root_id = ?", defID)
|
||||
} else {
|
||||
rows, err = query("SELECT block_id FROM refs WHERE def_block_id = ?", defID)
|
||||
rows, err = query("SELECT DISTINCT block_id FROM refs WHERE def_block_id = ?", defID)
|
||||
}
|
||||
if err != nil {
|
||||
logging.LogErrorf("sql query failed: %s", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue