Jump to content

[SOLVED] Table Join Question


webguync

Recommended Posts

I have a table Join Query

$sql = "SELECT ID, emp_name, emp_id FROM $employee_table LEFT JOIN $check_table ON `ID` = `EmpID` ORDER BY ID ASC";

 

and I want to add another column to Join,so it would be  ON `emp_name` = `EmpName`

 

would I need to do a separate $sql or can I combine what I have above somehow?

Link to comment
https://forums.phpfreaks.com/topic/111741-solved-table-join-question/
Share on other sites

well,

 

I have another post http://www.phpfreaks.com/forums/index.php/topic,203543.0.html on the PHP forums, explaining what I am trying to accomplish posting information from a select form. I thought another join might be what I need, but I didn't know for sure, or even if it was possible.

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.