catfan / Medoo

The lightweight PHP database framework to accelerate the development.
https://medoo.in
MIT License
4.84k stars 1.15k forks source link

Argument '2' passed to select() is expected to be of type array, string given #1125

Open stefankummer opened 1 month ago

stefankummer commented 1 month ago

Information

Describe the Problem Argument '2' passed to select() is expected to be of type array, string given

catfan commented 1 month ago

You are passing a string to the second select() parameter.

Please read the documentation. https://medoo.in/api/select.

stefankummer commented 1 month ago

Hi, according the docs that i"ve read, to select an entire column : $data = $database->select("account", "user_name"); Second argument is a string.

catfan commented 1 month ago

@stefankummer Sorry, my mistake. However, it should work. It's on the test case. https://github.com/catfan/Medoo/blob/d1ff4e0e873a3e032e3d8804031dd6be4e013b22/tests/SelectTest.php#L60-L73

Please provide the full code you called.