Medoo icon indicating copy to clipboard operation
Medoo copied to clipboard

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

Open scr4bble opened this issue 3 years ago • 2 comments

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)'].

scr4bble avatar Feb 23 '22 20:02 scr4bble

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

change to

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

deawx avatar Jun 30 '22 08:06 deawx

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

scr4bble avatar Jul 01 '22 12:07 scr4bble