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

SQL State (42s22): Column not found: 1054 Unknown column '' in 'order clause' #374

Open
alishahbaz344 opened this issue May 29, 2018 · 1 comment

Comments

@alishahbaz344
Copy link

please help me fix this error i'm getting this error illuminate database queryexception
SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'order clause' (SQL: select * from posts where title like %% order by `` asc limit 5 offset 0).
please tell me how can i fix this error

@AdrianHL
Copy link
Contributor

Can you show what you have in the all function within the posts controller? It looks like you have not defined the order by correctly.

I'd suggest you to add a default order by doing something like

$this->grid->orderBy('id', 'asc');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants