I'm trying to:
$query="SELECT fname, lname FROM employees WHERE employee_id=$employee_id";

echo "fname lname";

Right now the page displays the employee ID, but I need it to display the employee's name.


Code:
$query="SELECT ad_order.company company, job_log.employee_id employee_id, job_log.time time, job_log.action action FROM ad_order LEFT JOIN (job_log) ON (job_log.ad_id=ad_order.id) WHERE ad_order.cust_id=$table_id ORDER BY company,time";
$result=mysql_query($query);
while ($row = mysql_fetch_assoc($result))

{
$company = $row['company'];
$time = $row['time'];
$employee_name = $row['employee_id'];
	if ($employee_name=="")
	$employee_name = "No Entry";
	else
	$employee_name = $row['employee_id'];
$action = $row['action'];
	if ($action=="")
	$action = "No Entry";
	else
	$action = $row['action'];
$showtime = date('m/d/y-h:m:s',$time);
	if ($showtime=="12/31/69-06:12:00")
	$showtime = "No Entry";
	else
	$showtime = date('m/d/y-h:m:s',$time);

echo "$company - $employee _name - $showtime - $action";
}