public static function select($db, $tableName, $colNames, $id)
    {
        $cols = array_map(
            function ($colName) {
                return Db::quote($colName);
            },
            $colNames
        );

        $sql = "select " . implode($cols, ", ") .
          " from " . Db::quote($tableName) . " where id = ?";
        return $db->query($sql, [$id]);
    }