Possibly simple PHP/MYSQL issue with retrieving and showing data
Posted
by
envoys
on Stack Overflow
See other posts from Stack Overflow
or by envoys
Published on 2011-01-05T18:50:20Z
Indexed on
2011/01/05
18:53 UTC
Read the original article
Hit count: 146
I have been racking my brains over this for a while now. Here is the data i have in the sql data base as an example:
ID | TYPE | DATA
1 | TXT | TEST
2 | PHP | php
3 | JS | JAVASCRIPT
That is just an example, there are multiple listing for TXT, PHP and JS throughout the table. What I want to do is retrive all the data and display it all into separate drop down/select boxes. Meaning, select box one would list all data with type TXT, select box two would list all data with type PHP and select box 3 would list all data with type JS. The only way I have came about doing this is doing individual sql queries for each different type. I know there is a way to do it all in 1 query and then display it the way I want to but I just can't seem to figure out how and I know its going to drive me nuts when someone helps and I see just how they did it. Thanks for the input.
© Stack Overflow or respective owner