You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to get records out of a table called CMS\Page, yes there's a backslash on the table name. Unfortunately the backslash seems to result in a strange JOIN behavior.
=> SELECT CMS\Page.*, title, date FROM CMS\Page LEFT JOIN Page ON Page.id = CMS\Page.Page_id LIMIT 5
Why do this happen? There's no reason why we shouldn't have backslashed on table names. At least not on the most recent MySQL/MariaDB versions.
Side Note: There's also the old annoying issue where using ->select(...) doesn't matter because ->from(...) will always add a select all on the table like Page.*.
Thank you.
The text was updated successfully, but these errors were encountered:
Hello, thanks for taking the time to report this. Escaping table and column names is a common request but for this current release we're not automatically escaping them due to backwards compatibility.
Hello,
I was trying to get records out of a table called
CMS\Page
, yes there's a backslash on the table name. Unfortunately the backslash seems to result in a strange JOIN behavior.Query without backslash:
=>
SELECT Page.*, title FROM Page LIMIT 5
Query with backslash on table name:
=>
SELECT CMS\Page.*, title, date FROM CMS\Page LEFT JOIN Page ON Page.id = CMS\Page.Page_id LIMIT 5
Why do this happen? There's no reason why we shouldn't have backslashed on table names. At least not on the most recent MySQL/MariaDB versions.
Side Note: There's also the old annoying issue where using
->select(...)
doesn't matter because->from(...)
will always add a select all on the table likePage.*
.Thank you.
The text was updated successfully, but these errors were encountered: