Bug #79703 [Opn->Nab]: Unable to use $row['field_name']

From: Date: Mon, 15 Jun 2020 23:57:04 +0000
Subject: Bug #79703 [Opn->Nab]: Unable to use $row['field_name']
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227499@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79703&edit=1 ID: 79703 Updated by: kalle@php.net Reported by: preetha at tyk dot jp Summary: Unable to use $row['field_name'] -Status: Open +Status: Not a bug Type: Bug Package: PDO PgSQL Operating System: Windows PHP Version: 7.4.7 Block user comment: N Private report: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. You need to define the fetch mode to populate associative result sets. Please see the documentation for PDOStatement::fetch(). Previous Comments: ------------------------------------------------------------------------ [2020-06-15 23:51:37] preetha at tyk dot jp I am using Postgre12 with PHP **************************** c:\xampp\php>php -v PHP 7.4.6 (cli) (built: May 12 2020 11:38:54) ( ZTS Visual C++ 2017 x64 ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies ------------------------------------------------------------------------ [2020-06-15 23:49:35] preetha at tyk dot jp Description: ------------ <td><?=$rows2['id']?></td> gives me the error Notice: Undefined index: id in C:\xampp\htdocs\test\index.php on line 225 But <td><?=$rows2['0']?></td> works Expected result: ---------------- <td><?=$rows2['id']?></td> should give the actual data from the table field 'id' Actual result: -------------- <td><?=$rows2['id']?></td> does not work at all ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79703&edit=1

« previous php.bugs (#227499) next »