It has been quite a while since I have used SQL, so it all drained abit. But when I use this query, $selectionArray['id'] has the value of 1, it returns me with this error:
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 'WHERE `id` = `1`' at line 1
This is the query:
$randomHashQuery = "INSERT INTO users (`hash`)
VALUES (`" . HASH . "`)
WHERE `id` = `" . intval($selectionArray['id']) ."`";
There is probably a really easy fix to this, but I can't seem to figure it out.