Right now I am going to just try to use an array to do this because I don’t know how and need to finish fast but for the sake of learning can someone help me with this problem.
I have a database and there are two tables that are somewhat connected.
table1 has a list of users who each have a unique id.
table2 has these same users organized into categories however table2 also list their unique id from table1 alongside their category id.
What I am trying to do is search for first and last name of the users from table1 however the catch is they must be of a specific category from table2.
So for example everyone named “John” from table2 who is in category “blue” table2.
Table 1 will list something like this: (ID#1, name:John…) table2 would look something like this (group:blue, ID:1) — hopefully that helps give a good visual.
I’m not sure if this is required but the primary key from table1 is the ID field however the primary key for table2 is a different id key which has no reference to any of this. I simply have it there because every database table I build always has an auto increment id key.
I’m a beginner programmer and this will really help me out in future projects.