Question : need to create output from more than one table using join

Need to create output from more than one table using join and wildcards..on the sql call
the sql statement works on the first table but cannot figure out the join...the third table
populates the emp_code_type of the second table.; at least thats the plan.

first table:accounts table:
account_id
account_name
physical_address
city
stat_prov
country
zip


second table:employees_table
account_uid
active_site_uid
emp_uid
emp_code_type
emp_name
emp_address
emp_city
emp_frequency
emp_hours_of_cleaning

third table:emps_code_type
emp_type_uid
emp_type_description

right now it working ok for the information for the first table but not sure how to join to the
second table.... attached is the two php files which do the calls...

Answer : need to create output from more than one table using join

try something like this:

SELECT a.account_name,
a.physical_address,
a.city,
a.stat_prov,
a.country,
a.zip,
e.emp_name,
e.emp_address,
e.emp_city,
e.emp_frequency,
e.emp_hours_of_cleaning,
et.emp_type_description
FROM accounts as a
INNER JOIN employees_table as e ON a.account_id=e.account_uid
INNER JOIN emps_code_type as et ON e.emp_code_type=et.emp_type_uid
WHERE somefield LIKE '%TEST%%'
Random Solutions  
 
programming4us programming4us