I'm just getting into MySql/MySqli really, and I'm using prepared statements. The whole of my script is working fine except this single line:
if ($stmt = $con->prepare("SELECT bandHash, userHash, userPassHash, type FROM account_active WHERE key=?")) {
I found out that's the line by manually tracking it down, then running the mysqli_error($resource)
function, and got this result You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key=?' at line 1
Please don't worry that it says line 1, that's just because of how it's been executed, it's actually line 280.
So what I'm wondering, because I'm already using statements like this, is "key" a reserved word that I cannot use - or do I need to look elsewhere for my error?
A simple yes or no answer will suffice, thanks!