No matter what I do in MySQL 5.0, for example
SELECT 'test' = FALSE
SELECT '' = FALSE
I always get 1 back in SQL. What is the reason for this? I expected 0 or FALSE
EDIT adding context to questions. So the problem arose, it so happened that $ name inadvertently became false, since this connection always passed, then I wondered why this works.
SELECT a.id
FROM user a
INNER JOIN inventory b ON b.user_id = a.id AND b.name = $name
source
share