是否可以在1个数据库中一次选择3个表?
PHP MySQL选择多个表
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
我想获得雇员表的价值,其中选择了$ id。然后$ id也获得log.time,log.date,logout.time和logout.date的值。
我已经尝试使用UNION,但没有任何反应。
你是什么意思“没什么反应”?你能发布你有问题的确切查询吗? – 2010-06-02 06:05:00