Your field name shouldn't be in single quotes, you can either use backticks (` as opposed to ') or none at all. If you are using MySQL <> is the equivalent of !=:
pickle wrote:I may be grasping at straws here, but will PHP parse the ".=" operator if $sql hadn't been set earlier?
It still will,
If the variable is not yet defined, it will create one and assign it to null so it will end up concatinating the string to a null value which will work fine.
However depending on your error_reporting level php might throw a NOTICE of an undefined variable.
twigletmac wrote:Your field name shouldn't be in single quotes, you can either use backticks (` as opposed to ') or none at all. If you are using MySQL <> is the equivalent of !=:
In MySQL both <> and != are valid and evaluated the same.