Page 1 of 1

mysql query select * from....

Posted: Fri Mar 06, 2009 6:44 pm
by ullasvk
Hello friend ,

I am doing a project where 1st dropdown value populates the second drop down menu.
i have a table with three columns id, length and breadth with values as

id length breadth
1 72 36
2 74 30
3 76 28
4 78 25

How to write a mysql query with selected value at first and remaining after that i.e, if i select length 76 the second drop down menu must contain 28 and remaning all values like this

1st menu 2nd menu
length breadth
76 28
72 36
74 30
78 25

I wrote the code in Ajax but i require the query for this.
Please anyone help me.

Re: mysql query select * from....

Posted: Thu Mar 19, 2009 1:02 am
by jaoudestudios
Something like this...

Code: Select all

SELECT * FROM [table] WHERE length = 76