FaaPz / PDO

Just another PDO database library
MIT License
316 stars 103 forks source link

Cannot use orderBy in query #64

Closed nont65 closed 8 years ago

nont65 commented 8 years ago

I had problem with Order By. It return error "SQLSTATE[42000]: Syntax error or access violation: 1064 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 'order = ? ORDER BY name_en ASC' at line 1"

This is my code $query = $this->db->select()->from('provinces'); $query->orderBy('name_en'); $result = $query->execute();

How can I Fix It.

nont65 commented 8 years ago

Ok, I've found bug in my code. Sorry.