Jump to content

How to do this?


tibberous

Recommended Posts

I have a row in a database that can be either be linked to an account or a location. It will always have an account_id, it might have a location_id.

 

If it has a location_id, I want to return the linked row from the location table, otherwise, I want it to just return the record.

 

Is there a way to select from two tables, but always select from at least one?

Link to comment
https://forums.phpfreaks.com/topic/122646-how-to-do-this/
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.