I have a problem, so I want to do that if by chance the user searched on and the code for it was no longer activated. In this way, I made a simple code:
$loginu = $_SESSION['login'];
$query = "SELECT `usrlogin`,`idcode` FROM `aktywacja` WHERE idcode = $numer AND usrlogin = $loginu ";
$result2 = mysql_query($query);
echo mysql_error();
if (mysql_num_rows($result2) == 0) {
not found
}
else {
found
}
and crashes me the following errors
Unknown column 'Kamil' in 'where clause' Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\kod.php on line 56 Where in this case I made a mistake?
Please help,
greet.