PHP MySQL Select multiple tables

Posted by Jordan Pagaduan on Stack Overflow See other posts from Stack Overflow or by Jordan Pagaduan
Published on 2010-06-02T06:01:38Z Indexed on 2010/06/02 6:03 UTC
Read the original article Hit count: 187

Filed under:
|

Is it posibble to select 3 tables at a time in 1 database?

Table 1: employee
              --> employee_id
              --> first_name
              --> last_name
              --> middle_name
              --> birthdate
              --> address
              --> gender
              --> image
              --> salary

Table 2: logs
              --> log_id
              --> full_name 
              --> employee_id
              --> date
              --> time
              --> status

Table 2: logout
              --> log_id
              --> full_name 
              --> employee_id
              --> date
              --> time
              --> status

I wanted to get the value of employee table where $id of selected. Then the $id also get the value of log.time, log.date, logout.time, and logout.date.

I already try using UNION but nothing happens.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql