/** * * @param string $username */ function is_username_exist($username) { include_once 'class/DBtraverser.php'; include_once 'class/Config.php'; include_once 'class/Config_user.php'; include_once 'class/DBcount.php'; $ary = ' where ' . Config_user::log_name . " = '{$username}' "; $myDBcount = new DBcount(Config_user::table_name, $ary); return $myDBcount->excute_without_conn(); }
/** * * @param string $username */ function is_username_exist($username) { include_once 'class/DBtraverser.php'; include_once 'class/Config.php'; include_once 'class/Config_user.php'; include_once 'class/DBcount.php'; $ary = ' where ' . Config_user::log_name . " = '{$username}' "; $myDBcount = new DBcount(Config_user::table_name, $ary); $retval = $myDBcount->excute_without_conn(); $row = mysqli_fetch_array($retval, MYSQLI_NUM); return $row ? $row[0] : 0; }