very good afternoon, community is passing me that when creating a json this brings me the duplicate data in the following way
in the json we see twice the same information duplicate and only need the one that has the names of the fields if suddenly someone knows the solution thank you very much ... I do not know what else is needed to help me since I am new commenting on this type of problems, thanks I'm working with vue,
How are you? Of course if you look
this is the function or method that makes the request to the DB
and this is the function in which I capture the returned response and store it in a model or variable type array
Cedano Thanks, of course, you are right not to pass a parameter in the query, the default process was to bring all the information with an index by the fetch filter that it has by default. Apply your method and it works perfectly, now I have a question with your explanation, regarding this point since I implemented it and it does not work $ this-> db_conexon-> setAttribute (PDO :: ATTR_DEFAULT_FETCH_MODE, PDO :: FETCH_ASSOC); I'm doing it this way
the google console shows the following
but I think it is referring to the empty json if you suddenly know the reason why the implementation of that maner does not work I thank you because I would like to have it global to avoid redundancy