Есть файл.
header("Content-type: text/html;charset=windows-1251");
if (sizeof($_POST)!=0)
{
$lnk = mysql_connect('127.0.0.1', 'root', '310188');
mysql_select_db('app', $lnk);
$ul = mysql_real_escape_string($_POST['ul'], $lnk);
$up = sha1($_POST['up']);
$r = mysql_query("SELECT * from `users` where `u_ul`='$ul' AND `u_up`='$up' limit=1");
if (mysql_num_rows($r)==1)
{
echo 'OK';
}
else
{
echo 'Error';
}
}
else
{
$form = file_get_contents('form.tpl');
$form = str_replace('{PAGE_URL}', $_SERVER['PHP_SELF'], $form);
echo $form;
}
?>
Выдает ошибку в строке if (mysql_num_rows($r)==1)
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\apache\localhost\www\app\index.php on line 16
Error
Не могу понять, что от меня хотят