[Digikam-users] database - tagtree - help please :-)

Arnd Baecker arnd.baecker at web.de
Fri Mar 9 20:55:12 GMT 2007


Alright, now an explicit example:

Let's try to get to find the parent of the `Person4`:
  export tag=Person4
  sqlite3 digikam3.db "SELECT id,pid FROM Tags WHERE name=\""$tag"\"  "
  Output: 4|16

Therefore the call (all in one line!) should give the parent,
more precisely: the id of the parent, its parent id, and name:
  sqlite3 digikam3.db " SELECT id,pid,name FROM Tags WHERE id=(SELECT pid
FROM Tags WHERE name=\""$tag"\")"
  Output: 16|0|Personen

Note that pid=0 if there is no further parent.

Hope this helps,

Arnd



More information about the Digikam-users mailing list