Medoo
Medoo copied to clipboard
Wrong medoo syntax in column definition using alias doesn't produce any error.
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)'].
$medoo_db->get('sometable', ['id', 'column AS alias_name'], ['id' => 1]);
change to
$medoo_db->get('sometable', ['id', 'column(alias_name)'], ['id' => 1]);
@deawx I think you didn't read the issue description properly.