I have a weird problem with a MySQL query…
It’s weird because it does not seem like it has faults in it, but it has, apparently…
This is the query:
$lastmessage = execute_scalar(“SELECT message FROM messages WHERE nick = 'nick' ORDER BY date LIMIT 0,1”);
And the error I am getting, on the same line, is this:
parse error: syntax error, unexpected t_string
What am I doing wrong?
You have to use
""or''(which are in the ASCII charset) to note a string in PHP. In your code you are using“which is a Unicode character.With
""your code would look like this:I think you copied the code from an website where the CMS automatically changed
"to“.