Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using $database->query($sql)->fechAll() returns column names and column iDs #1023

Closed
esferium opened this issue Oct 20, 2021 · 1 comment
Closed

Comments

@esferium
Copy link

Information

  • Version of Medoo: "catfan/Medoo": "^1.7"
  • Type of Database (MySQL):
  • System (Windows):

Describe the Problem

Using a sql statement in $database->query("select ...")->fechAll returns json object, with the names of the columns, but also with the id of the column.

{ "title": "title example", "0": "title example"}

Expected output
{ "title": "title example" }

@esferium
Copy link
Author

$database->query("select...")->fechAll (2)
$database->query("select...")->fechAll (PDO::FETCH_ASSOC)

https://www.php.net/manual/es/pdostatement.fetchall.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant