HomeCode
Diffusion Zed 459a1100f6ce

Use MySQL rows as associative arrays and name all columns

Description

Use MySQL rows as associative arrays and name all columns

Currently, the MySQL rows use a mix of enumerated and associative arrays.

Plan is to restrict by default in Keruald Database the fetch_row() method
to use associative array.

Goal is to ease API serialization and ensure proper code handling:

  • no SELECT *, every column should be named
  • SELECT <formula> uses aliases: SELECT <formula> as <descriptive name>

Reference: https://www.php.net/manual/en/mysqli-result.fetch-array.php

Details

Provenance
derecksonAuthored on Jun 22 2023, 20:45
Parents
rZED4949c372d791: Proofread HTML code
Branches
Unknown
Tags
Unknown