In my php.Mysql ($sql) result should be 1.Sysum should not be empty in another word, mysql_num_rows($sel) > 0
should be true
.
But actually,mycode can not work.I don't know why.Who can help me?
$conn = new PDO('mysql:host=localhost;port=3306;dbname=hpc' , 'root' , 'Yd');
$Name=$_COOKIE['PName'];
$sql = "select sysnum from hpc where handler='".$Name."' and stat='N';";
$sel=$conn->query($sql);
if(mysql_num_rows($sel) > 0)
{
mycode;
}