Topic awaiting preservation: setting up a keyword system for database (Page 1 of 1) |
|
---|---|
Lunatic (VI) Inmate From: under the bed |
posted 02-08-2007 18:38
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 |
posted 02-08-2007 19:23 |
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 02-08-2007 19:42
quick answer: yes it is. |
Lunatic (VI) Inmate From: under the bed |
posted 02-08-2007 20:37 |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
posted 02-08-2007 21:39
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 |
posted 02-10-2007 02:26
Well, it took me five minutes to start understanding Warmage's post. |
Lunatic (VI) Inmate From: under the bed |
posted 02-10-2007 16:38 |