Error in num_rows in php

0

The problem is this:

<?php
include '../functions/db.php';
include '../functions/Database.php';

$db = new Database();
$nick = $_POST["nick"];
$consulta = "SELECT cedula FROM pacient WHERE cedula = $nick";
$result = $db->select($consulta);

if( $result->num_rows > 0)
    echo 0;
else
    echo 1;

This message comes to me

  

Notice : Trying to get property of non-object in    C: \ xampp \ htdocs \ IVSS \ app \ core \ url.php online 10

    
asked by Josbert Hernandez 15.09.2017 в 01:31
source

0 answers