I have a field with name 'order' in the database. How to select it, using addField?

$query->addField('sco_groups', 'order');

Gives an error.

  • What's the error?
    – Clive
    Dec 5 '12 at 13:58
  • @Clive SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax
    – user4035
    Dec 5 '12 at 14:38

I fixed it, using this code:

$query->addField('sco_groups', 'order', 'field_order');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.