monkeytooth Posted January 8, 2009 Share Posted January 8, 2009 Im looking for ideas.. I have 2 tables one of which contains private info, the other which contains public info, both contain a shared unique ID tag that differentiate the data and keep it all contained to the extent of what belongs to which master ID. Here in lies my problem however, when I originally laid out the tables it was for other purposes, now after the database has been populated and continues to grow the client has requested the ability to list certain data in a particular way. Where I am running into a problem is I need to use the first table to determine what to pull from the second table. But I am running circles in my head trying to figure out how to do that properly. Background on the first table.. Its part of the user account login's. It also contains whether or not the account is verified and able to be used, via a specific variable. The second table contains a bulk of the member info.. name, state, county, age, etc.. What is being made or hoped to be made is a way of listing the accounts that are active from table 1 so to speak and have it display based off the county information in table 2, so if the user tempting to pull the info decides he wants to list by a specific county then a specific county will be used for the over all list.. Im shoot for ideas I cant seem to wrap myself off around a good one to work with.. cant figure out where to start on this notion either for some reason. Only thing I can think of is creating an array off the first table and base that on the unique id the tables share then take the array of unique ids and list based on those from table 2.. but putting the array together and running it to do so evades me.. I am open to any help, suggestions, and ideas on this.. thanks in advance.. Link to comment https://forums.phpfreaks.com/topic/140069-array-confussion/ Share on other sites More sharing options...
Mark Baker Posted January 9, 2009 Share Posted January 9, 2009 Suggest you go and read the appropriate section of your database documentation on join queries. This is basic database stuff. Link to comment https://forums.phpfreaks.com/topic/140069-array-confussion/#findComment-733154 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.