Wednesday, 18 September 2013

Laravel 4 - get raw SQL error message

Laravel 4 - get raw SQL error message

I'm using Laravel 4 with Postgres.
If I run the following statement in PGAdmin
SELEC * FROM tables
I get the following error message
ERROR: syntax error at or near "selec"
LINE 1: selec * from tables
^
********** Error **********
ERROR: syntax error at or near "selec"
SQL state: 42601
Character: 1
Now when I run the following query in Laravel 4
DB::select("SELEC * FROM tables");
I get a whole lot of other extra error messages.
Is it possible to actually get the raw Postgres error message somehow?

No comments:

Post a Comment