我有以下查询在PHPMyAdmin中完美运行,但在与PHP一起使用时会产生不准确的结果:
SELECT u.id,u.firstname AS specfn, u.lastname AS
specln,u2.firstname,u2.lastname,r.entertainer_id
FROM users u
INNER JOIN relationship r ON u.id=r.spectator_id
INNER JOIN users u2 ON r.entertainer_id=u2.id
WHERE (u2.lastname like '%e%' OR u2.firstname like '%e%') AND u.id=1
为什么这不能用PHP工作?