note 100540 added to function.mysql-num-rows
| From: | sunil at mansainfotech dot com | Date: | Fri, 22 Oct 2010 06:21:25 +0000 |
| Subject: | note 100540 added to function.mysql-num-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173365@lists.php.net to get a copy of this message | ||
If you try to login process
When we query through mysql_query()
it return an empty resultset hwn the condition did not matches
So try this method
$uname= $_POST['uname'];
$upass= md5($_POST['upass']);
$query = "select * from users_tab where username_user ='$uname' AND password_user =
'$upass'";
$result = mysql_query($query);
if(($result == false)|| mysql_num_rows($result)==false)
{
return '99';
}
else
{
$data = mysql_fetch_array($result);
//print_r("Returnable : ".$data);
return $data;
}
----
Server IP: 69.147.83.197
Probable Submitter: 122.173.126.101
----
Manual Page -- http://www.php.net/manual/en/function.mysql-num-rows.php
Edit -- https://master.php.net/note/edit/100540
Del: integrated -- https://master.php.net/note/delete/100540/integrated
Del: useless -- https://master.php.net/note/delete/100540/useless
Del: bad code -- https://master.php.net/note/delete/100540/bad+code
Del: spam -- https://master.php.net/note/delete/100540/spam
Del: non-english -- https://master.php.net/note/delete/100540/non-english
Del: in docs -- https://master.php.net/note/delete/100540/in+docs
Del: other reasons-- https://master.php.net/note/delete/100540
Reject -- https://master.php.net/note/reject/100540
Search -- https://master.php.net/manage/user-notes.php