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

Wrong medoo syntax in column definition using alias doesn't produce any error. #1038

Open
scr4bble opened this issue Feb 23, 2022 · 2 comments

Comments

@scr4bble
Copy link

scr4bble commented Feb 23, 2022

Information

  • Version of Medoo: v2.1.4
  • Version of PHP: 8.1.3
  • Type of Database (MySQL, MSSQL, SQLite...): MySQL
  • System (Liunx|Windows|Mac): Linux

Describe the Problem
Library doesn't produce any warning/error/exception when using wrong syntax for column definition.

Detail Code

$medoo_db->get('sometable', ['id', 'column AS alias_name'], ['id' => 1]);

Expected output
I would expect this to crash/fail as medoo library has different syntax for defining column aliases: ['column (alias_name)'].

@deawx
Copy link

deawx commented Jun 30, 2022

$medoo_db->get('sometable', ['id', 'column AS alias_name'], ['id' => 1]);

change to

$medoo_db->get('sometable', ['id', 'column(alias_name)'], ['id' => 1]);

@scr4bble
Copy link
Author

scr4bble commented Jul 1, 2022

@deawx I think you didn't read the issue description properly.

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

2 participants