Hi,
Bascially you're joining two tables. You can look on line for SQL join examples and I'll show one here also.
I actually design databases for a living. It looks as if you have your welll.... lets say apples mixed up in the oragne barrel. -
So I'll make some things up here to make my point clear.
A researcher is a person ( in a role, but that's another story) so lets have a person table. In this person table we'll have the columns:
person_id,
surname,
lastname
We'll use the person_id to identify them. This means when some selects a researcher from the drop down or html <select> control the value they select is a person id
Then we'll have a research project table. (Ohhhh that doesn't even sound right). But for this example well make this anyway.
In this research table we'll have the columns
project_id,
project_nm,
project_keywords,
person_id
(The project keywords column might be a large varchar 225 and the key words about the project are in there in a comma separated fashion. For example "amino acid, protien, petptide, nitrogen")
Now we'll say the relationship between these two tables are:
A research project has only one researcher.
A researcher can have zero, one or many research projects.
I hope you can see 2 important things One is that I've described the relationship between these two entities. The other is that person_id appears in both tables..... here is where we'll do the join.
So now pretend I have 3 reasearchers or 3 rows in my person table. And pretend I have 18 rows or 18 research projects in the project table. My query might be something like:
SELECT per.person_id, per.surname, per.lastname, proj.project_id, proj.project_nm, proj.project_keywords, proj.person_id FROM person AS per, project AS proj WHERE per.person_id = proj.person_id AND proj.project_keywords, LIKE %searchword%
This query isn't exact - But it gives you an idea how to join tables. If you have access to your websites php MySQLAdmin pages where you can run queries in a test window that would help.
First build a query taht does a join between the tables you need. THEN add the WHERE or filter clause that looks for the keywords. It will be much easier that way.
Hope that gets you moving in the right direction
Vmusic