开发者

PHP Error Call to undefined function RecordCount()

I'm fairly new to PHP and have been trying to make a simple login using PHP PDO. When I try and login it keeps throwing this error - Call to undefined function RecordCount(). My searching has provided no insight as to why this is happening. My code is below. Any insight into where to look or why this is happening would be appreciated. Thanks!

     <?php
        include_once '../utils/dbcon.php';

        $stmt = $dbc->prepare("SELECT username,password FROM users where username = ? AND password = ?");

if ($stmt->execute(array($_GET['username'],$_GET['password'])))
 {


   if ($stmt.RecordCount())
       {

        echo "record开发者_如何转开发 found";
       } 
   elseif(!$stmt.RecordCount())
           {
       echo "No records found";
       }

 }  


        ?>


Your syntax is wrong:

$stmt.RecordCount()

should be

$stmt->RecordCount()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜