what sql query perspective arrangement "dynamic columns"


i have list data, i grant supplement meta information table.



i give an interface allows provide nonetheless they're adding additional columns list information stored in, nonetheless i'm indeed storing information another table.



data table
dataid
data

meta table
dataid
metaname
metadata


so wanted list stored data, date, name, following i'd have information data table, "date" metaname, date metadata, another quarrel meta list "name" metaname name metadata.



i need query takes information tables presents nonetheless opening unparalleled list twin additional columns "data" "name" fan feeling there's unparalleled list tradition columns:



mytable
data
date
name


or, words, i here:



data table
dataid data
1 testing!
2 hello, world!

meta table
dataid metaname metadata
1 date 20081020
1 name adavis
2 date 20081019
2 name mdavis


to here:



mytable
information date name
testing! 20081020 adavis
hello, world! 20081019 mdavis


years ago i mysql controlling php, i twin queries, initial additional meta data, second join together. i'm anticipating difficult databases have swap methods traffic this.



related choice 3 .



-adam



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?