Welcome Guest, Not a member yet? Register   Sign In
MySQL 8 error on subselect parenthesis
#1

Hi,

I upgraded the database from MySQL 5.7 to 8.0 and now we have some query generated by CI query builder that can't be executed.

For example:
Code:
$this->db->from("(SELECT col1 FROM table) AS alias");

generates this query:
Code:
SELECT ... FROM ((SELECT col1 FROM table) AS alias)

And it worked with 5.7 but 8.0 doesn't like the exterior parenthesis. The query needs to be:
Code:
SELECT ... FROM (SELECT col1 FROM table) AS alias

What can I do?

Thx
Reply


Messages In This Thread
MySQL 8 error on subselect parenthesis - by dimas - 12-19-2018, 04:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB