Jump to content

help with a JOIN


tqla

Recommended Posts

Hello. I think this will be a JOIN but my to columns that the tables have in common have different names.

 

The 'allusers' table has an 'id' column and a 'name' column.

 

The 'doctors" table has an 'obj_id' column and a 'value' column.

 

The 'id' table in the 'allusers' table matches the 'obj_id' column in the 'doctors' table.

 

The 'value' column in the 'doctors' table will have a value of either 'patient' or 'provider'.

 

 

How can I query the 'doctors' table and get the 'obj_id' of every record that has 'provider' in the 'value' column and then cross reference that with the 'id' column in the 'allusers' table so I can make an array containing the names of 'allusers' who are providers?

Link to comment
https://forums.phpfreaks.com/topic/205684-help-with-a-join/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.