Php mariadb unique field selection for index of query result.
| From: | cds1984.diagnostic.net.au via php-db | Date: | Tue, 07 Feb 2023 14:10:01 +0000 |
| Subject: | Php mariadb unique field selection for index of query result. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-49203@lists.php.net to get a copy of this message | ||
Hi,
Quick question.
I may be missing something but for years I've been processing the output of a query into a new
array using the unique(normally primary key) field in the table as the index so I can pull data
matches simply further into the script without another loop through all the returned data.
Is there an option I'm missing to assign a field as the output array index from a PHP based
query?
Thanks,
--
Richard Scotford