我的 MySQL 数据库中有两个表:
USERS ('id_user' - 'id_client' -> the same as the id in CLIENTS)
CLIENTS ('id_client' - 'name' etc.)
我想打印所有客户和各自的用户。这是我的查询:
SELECT * FROM clients AS c LEFT JOIN users AS u ON c.id_client = u.id_client
似乎没问题,但是当我尝试id_client
从 table打印 the 时遇到了麻烦clients
。如何使用 PHP 打印它们?看来他们是空的......我的查询错了吗?