Drizzle TeamDT
Drizzle Team3y ago
28 replies
Hugo

Mysql Syntax error executing query

Hi i got this issue:
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 near '(select coalesce(json_arrayagg(json_array(stores_categories.id_store, `store' at line 1

when i try to run this query:
const result = await db.query.stores.findMany({
      with: {
        categories: true,
        pictures: true
      },
    });

and in images you can see my db connection, and schemas
image.png
image.png
image.png
image.png
image.png
Was this page helpful?