I’m using PHP. When I use SELECT on a certain column, it returns an error but all other columns work fine. I checked and there are no NULL/blank etc. cells.
Here’s the code:
$result=mysql_query("SELECT * FROM messages WHERE from='$user' AND reply='-1'");
DELETE won’t work either on that same column, but all other columns work!
as far as I can tell there’s nothing different about the column and I’ve tryed it on different scripts aswell. All other collumns on the table work perfectly fine except for this one. Is this a bug?
(Basically I made it so that every row has a “from” and “to” cell. If the message is a reply to another then the “reply” value changes to that message’s ID.)
the column
fromneeds backticks (``) around it or you need to rename it. MySQL thinks you are sayingFROMtwice.