I want to get all the rows that were "given by" the "System"(should only return one row, cause only one row in the table meets that condition). But even tho it gets the row right, and givenBy's value is "System", it still returns "3" in the ternary operator.
So, I have this little piece of code, where
$query = mysql_fetch_assoc(mysql_query('SELECT * FROM regtokens WHERE token = \'' . $token . '\''));
Here is my Code :
echo $query['givenBy']; //outputs "System"
$level = ($query['givenBy'] === 'System' ? 1 : 3);
echo $level; //outputs "3"
How can i do this ?