<?php
$db = new mysqli('localhost', 'root', '', 'siakad');
$res = $db->query("SELECT COUNT(*) as cnt FROM mahasiswa WHERE id_mahasiswa_pddikti != '' AND id_mahasiswa_pddikti IS NOT NULL");
print_r($res->fetch_assoc());
