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

Columns use quote parsing to cause SQL error #77

Open
1 task done
zaishui15 opened this issue Sep 29, 2022 · 0 comments
Open
1 task done

Columns use quote parsing to cause SQL error #77

zaishui15 opened this issue Sep 29, 2022 · 0 comments
Assignees
Labels
status:to be verified Needs to be reproduced and validated. type:bug Bug

Comments

@zaishui15
Copy link

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

Database

MySQL

What happened?

I have the query columns a bug happened!

$result = $database
    ->select([
        'table1.id as t.id'
    ])
    ->from('table1')
    ->fetchAll();

I need this result

select `table1`.`id` as `t.id` from `table1`;

The actual result is

select `table1`.`id` as `t`.`id` from `table1`;

Result in query error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use

Version

database 2.0
PHP 8.1
@zaishui15 zaishui15 added status:to be verified Needs to be reproduced and validated. type:bug Bug labels Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:to be verified Needs to be reproduced and validated. type:bug Bug
Projects
Status: Todo
Development

No branches or pull requests

2 participants