![]() Topic awaiting preservation: setting up a keyword system for database (Page 1 of 1) |
|
---|---|
Lunatic (VI) Inmate From: under the bed |
![]() I have been wanting to add keywords to my links databse and image gallery, but am unsure how best to implement this. |
Paranoid (IV) Inmate From: Norway |
![]() |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() quick answer: yes it is. |
Lunatic (VI) Inmate From: under the bed |
![]() |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
![]() tag == keyword code: create table {table plural}_tags ( id int, {table singular}_id int, tag_id int ) create table tags ( id int, name varchar)
code: select tags.name from tags join {table}_tags link on link.tag_id = tags.id join {table} on {table}.id = link.{table}_id where {table}.id = ?
code: select * from {table} join {table}_tags link on link.{table}_id = {table}.id join tags on tags.id = link.tag_id where lower(tags.name) like lower(?)
|
Paranoid (IV) Inmate From: Paris, France |
![]() Well, it took me five minutes to start understanding Warmage's post. |
Lunatic (VI) Inmate From: under the bed |
![]() |