92 | | The {{{select()}}} method accepts both field ''names'' and {{{Field}}}s in the field list (can even be mixed, but not duplicated). The callback is invoked with an array of Rows. |
| 92 | The {{{select()}}} method accepts both field ''names'' and {{{Field}}}s in the field list, as well as Field expressions (can even be mixed): |
| 93 | |
| 94 | {{{#!js |
| 95 | // Example of a field name (=string) |
| 96 | var fieldName = 'myfield'; |
| 97 | |
| 98 | // Example of a Field: |
| 99 | var field = table.$('myfield'); |
| 100 | |
| 101 | // Example of a Field expression: |
| 102 | var expr = table.$('myfield').lower(); |
| 103 | }}} |
| 104 | |
| 105 | The callback is invoked with an array of Rows. |
| 106 | |
| 107 | If a second callback is added as last argument, it will be invoked with an error message (string) if the SELECT fails for some reason. Without error callback, errors will be shown in an {{{alert}}} dialog. |