Files module - problem onQuerying ordering (SQLSTATE42000: Syntax error or access violation: 1140)
Created 8 years ago by gohano

Files module - problem onQuerying ordering (SQLSTATE[42000]: Syntax error or access violation: 1140) Hello, I have problem with ordering inside onQuering callback. This is strange because it also happens on fresh installation of pyrocms 3.1 when I go to Files -> files -> Upload. https://www.evernote.com/l/AOJDYaMIEbREvpRiGedH9RueGH-V7Zo2LZc Once I commented these 2 lines of code: https://www.evernote.com/l/AOKs09-gPPJElpsKs4xkLQuuPvGDgT8PVIY The problem disappears. I use mysql 5.5.42 version. Has anyone had a similar problem and solved it?

huglester  —  8 years ago

Hello

I have not seen this. strange it is causing the trouble...

but this is probably some sql 'mode' restriction... try setting sql_mode="" in mysql.cnf in [mysqld] section... And see if it helps, just to test

But of course it would be better to be fixed on the query builder level

gohano  —  8 years ago

Solved. The problem was default enabled mysql strict mode in laravel database configuration. https://www.evernote.com/l/AOL2517hQf5Pha_lxS-bc5GLgFihdO7Pgcg It is strange that the problem is so rare because the strict mode in pyrocms is deafult set to ture after installation (I use mysql 5.5.4) A little more inforamtions https://mattstauffer.co/blog/strict-mode-and-other-mysql-customizations-in-laravel-5-2