oktadev/okta-php-core-rest-api-example

Select statement all columns

Closed this issue · 1 comments

In PersonGateway.php, statement at line 34 is:

SELECT
    id, firstname, lastname, firstparent_id, secondparent_id
FROM
    person
WHERE id = ?;

You are selecting all the columns, why not using * ?

Selecting specific columns is more future-proof, since later if you add a new column that isn't needed by this code it would waste bandwidth transferring that data from the database.