开发者

PHP MySQL join table

$sql = "SELECT logs.full_name, logout.status FROM logs, logout WHERE logs.employee_id = logout.employee_id";
tables --> logs
           logout

I'm having error on this. I search join tables in goog开发者_C百科le. And that's what I got. What is wrong with this code?


I don't see a "JOIN" anywhere in your query.

The correct syntax:

SELECT logs.full_name, logout.status FROM logs
    LEFT JOIN logout ON (logs.employee_id = logout.employee_id);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜