mysql - sql store the data in the column wise -


   id user_id  apt_id name   value datetime     1  1        1      bp     109   ....     2  1        1      sugar  180   ....     3  2        2      bp     170   .... 

i trying create table in approach because, patient column not standard one, patient store bp , sugar, sometime bp.

am right in creating design. if right, how records of single patient.

thanks,

if not wrong, userid patientid in scenario, in case, use below query single patient record,

select * patienttable user_id = '1' 

here single patient record. i.e., user_id = 1

output:

id user_id  apt_id name   value datetime 1  1        1      bp     109   .... 2  1        1      sugar  180   .... 

note: can change want instead of 1


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -