|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-02-14 17:06 UTC] phanto@php.net
don't know if this is only related to the mssql extension, but when i retrieve a NULL - field from the database the var will be set to "" or 0 or whatever in php. is_null() returns false. harald. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 10:00:02 2025 UTC |
<?php $db = mssql_connect("localhost", "xxx", "yyy"); mssql_select_db("zzz", $db); $result = mssql_query("select NULL as test", $db); mssql_fetch_row($result); $blah = mssql_result($result, 0, "test"); $huh = NULL; echo is_null($blah); // false var_dump($blah); // bool(false) echo is_null($huh); // true var_dump($huh); // NULL ?>