"; Missing field

Seems that you're trying to retrieve the value of (or a function based on) a field called , but it is not on the fields your query returned to me.

Note that when the query returns (programmer stuff here now), it returns is an associative array, a array which the elements can be reached using their names not their numbers (yes, you can do that, but calling 0 and not MYFIELD will be confuse).

Check your SQL query fields and the fields you put on your XML layout file, on the FIELDS element (inside the ROWs there, on COLs of TYPE="FIELD"). Check if they are equal on your query and on your XML file.

One thing that can make this happens when the fields are the same on the SQL query and the XML file is the case sensitive thing.
Note that myfield is different from MYFIELD on some databases, and it's a good idea you put the fields on your query and XML file the way your database works, and with same case on both places.