Retrieve from table by multiple referencing the primary key

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ullasvk
Forum Newbie
Posts: 21
Joined: Fri Feb 13, 2009 11:55 pm

Retrieve from table by multiple referencing the primary key

Post 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
Last edited by ullasvk on Mon Sep 27, 2010 12:05 pm, edited 1 time in total.
User avatar
DigitalMind
Forum Contributor
Posts: 152
Joined: Mon Sep 27, 2010 2:27 am
Location: Ukraine, Kharkov

Re: Retrieve from table by multiple referencing the primary

Post by DigitalMind »

OMG
What do you want to do?
Post Reply