How to read the names of bookmark folders from places.sqlite

RESOLVED INVALID

Status

()

Firefox
Bookmarks & History
RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: Ronny, Unassigned)

Tracking

49 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: read places.sqlite)

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20161019084923

Steps to reproduce:

the following command line in sqlite manager shows all bookmarked urls and their titles of parent 136:
SELECT * FROM moz_bookmarks AS a JOIN moz_places AS b ON a.fk = b.id WHERE a.Parent = 136


Actual results:

it works. but...


Expected results:

how can i get the name of the parent 136 (136 is just an example).
i 've got no table "moz_bookmarks_roots" in my places.sqlite
(Reporter)

Updated

2 years ago
Whiteboard: read places.sqlite
This data is also in moz_bookmarks, just look up the parent id's title in the same table.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Component: Untriaged → Bookmarks & History
Resolution: --- → INVALID
(Reporter)

Comment 2

2 years ago
Hello Sebastian,

i'm very close to an positive result.
this command:
select b.title, p.url from moz_bookmarks b inner join moz_places p on b.fk = p.id
where parent = (select id from moz_bookmarks where title = 'infos')
shows me all urls in folder "infos"

I do understand what you want me to do but i'm not as experienced to get the right syntax by myself.

i want to see 3 columns with all bookmarks i got.
1st column - names of the folders
2nd column - titles of url
3rd column - url

something like that:
select b.parent_name, b.title, p.url from moz_bookmarks b inner join moz_places p on b.fk = p.id

"parent_name" is not the right syntax, as you know.

thanks.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
this is not a bug, so it should stay invalid.

I'm not sure why you need to run such a query, but to get the parent title you need to further join on moz_bookmarks, since this is a hierarchy. Something like

SELECT p.title, b.title, h.url
FROM moz_bookmarks b
JOIN moz_places h ON h.id = b.fk
JOIN moz_bookmarks p ON p.id = b.parent
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago2 years ago
Resolution: --- → INVALID
(Reporter)

Comment 4

2 years ago
Hello Marco,

it is not a bug that's right.

Thank you very much for that working command line.

Have a nice day.

Bye
You need to log in before you can comment on or make changes to this bug.