Essentially, I want to creat a data acquisition layer that can be accessed via HTTP. The client passes in a query and the data acquisition layer (apache 2 module) queries the database and retrieves a dataset. The question is, how to return the data to the client. It's essentially an array of data that I can encode, but how do I separate the fields and rows, for example. Thanks in advance.