Notice: Undefined index: UserId in D:/_PHP_Test/Test2/test_connLocalDB.php on line 32 ::王小一 Notice: Undefined index: UserId in D:/_PHP_Test/Test2/test_connLocalDB.php on line 32 ::王小二 Notice: Undefined index: UserId in D:/_PHP_Test/Test2/test_connLocalDB.php on line 32 ::王小三 Notice: Undefined index: UserId in D:/_PHP_Test/Test2/test_connLocalDB.php on line 32 ::王小四 Notice: Undefined index: UserId in D:/_PHP_Test/Test2/test_connLocalDB.php on line 32 ::王小五
Notice: Undefined offset: 1 in D:/_PHP_Test/Test2/test_connLocalDB.php on line 43 1:: Notice: Undefined offset: 1 in D:/_PHP_Test/Test2/test_connLocalDB.php on line 43 2:: Notice: Undefined offset: 1 in D:/_PHP_Test/Test2/test_connLocalDB.php on line 43 3:: Notice: Undefined offset: 1 in D:/_PHP_Test/Test2/test_connLocalDB.php on line 43 4:: Notice: Undefined offset: 1 in D:/_PHP_Test/Test2/test_connLocalDB.php on line 43 5:: 分析: mssql_fetch_assoc() 和用mssql_fetch_array()加上第二个可选参数 MYSQL_ASSOC 完全相同。它仅仅返回关联数组。这也是 mssql_fetch_array()起初始的工作方式。因此用$row[索引值]无法取到值。