Page 1 of 1

Retrieve from table by multiple referencing the primary key

Posted: Mon Sep 27, 2010 7:00 am
by ullasvk
Hi all,
I have struck in this, kindly help me.

I got two tables { master,values}
Master table contains 5 columns : id,density,color,length,width,height.
values table contains 6 :: id,density,color,length,width,height,date.
values table contains only references of master table.
example

Master table : [1,23,Red,32,25,36]
values table : [1,1,1,1,1,1,2010-27-09]

My query is
select master.density as density, master.color as color, master.length as length, master.width as width, master.height as height,value.date as date from values,master where values.density = master.id and values.color = master.id and values.length = master.id and value.width = master.id and value.height = master.id and values.id = 1
When i run this query it shows nothing in phpmyadmin.What i want is show the values table with the actual value of each column retrieved from the master table

Thanks in advance

Re: Retrieve from table by multiple referencing the primary

Posted: Mon Sep 27, 2010 7:21 am
by DigitalMind
OMG
What do you want to do?