vaupell Posted January 24, 2010 Share Posted January 24, 2010 database looks like this id|columa|user|columc --------------------------- 1|dataA|user|selectorid1 2|dataB|user|selectorid2 3|dataC|user|selectorid3 4|dataA|user1|selectorid1 5|dataB|user1|selectorid2 6|dataC|user1|selectorid3 7|dataA|user2|selectorid1 8|dataB|user2|selectorid2 9|dataC|user2|selectorid3 ---------------------------- What i need is user - dataB user1 - dataB user2 - dataB I dont know the values of the usernames/id's and i donot know the dataB contents i DO know selectorid2 so i was thinking something like this $getdataB = SELECT DESTINCT dataB FROM mytable WHERE selectorid2 ; but how do i now show/work with the data from dataB i was thinking something like foreach $getdataB { echo $getdataB; } which ofcourse didnt work.. any help on this matter would be appriciated.. thank you. Quote Link to comment https://forums.phpfreaks.com/topic/189606-need-help-with-arrays-select-multiple-rows-when-selectorvalue-match/ Share on other sites More sharing options...
fenway Posted January 28, 2010 Share Posted January 28, 2010 I don't follow. Quote Link to comment https://forums.phpfreaks.com/topic/189606-need-help-with-arrays-select-multiple-rows-when-selectorvalue-match/#findComment-1002781 Share on other sites More sharing options...
vaupell Posted January 28, 2010 Author Share Posted January 28, 2010 I dropped the issue, the database struckture was just to crazy. It allowed a admin of the cms to create costum items, placed between fixed items in a form for the users. i changed it so the fixed items got structured in its own table and was easy to select, while the costum now is selected by the selectorid.. solved, but not like original intended.. Quote Link to comment https://forums.phpfreaks.com/topic/189606-need-help-with-arrays-select-multiple-rows-when-selectorvalue-match/#findComment-1003023 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.