Page 1 of 1

How to fetch single/few columns from database?

Posted: Tue Jun 04, 2013 9:29 am
by Rahul Chidgopkar

Hi,

I'm creating a photo app and am storing photos in database. I want to list all photos by name and fetch a particular photo when its name is clicked.

So on page load, I only want to get _id and name columns from database. If a name is clicked, I want to query for the _id and fetch the photo. I have created a list service and query service. But I don't know how to fetch only _id and name column and not the photo column. I edited the Response field, but I think it's only a client side solution. If I test the service, all columns are still getting fetched.

Could you tell me how to get only 2 out of the 5 columns?

Thanks,
Rahul.


How to fetch single/few columns from database?

Posted: Tue Jun 04, 2013 11:47 am
by Maryna Brodina

Hello! There is no such possibility, you can try to recreate your DB to have images stored in a separate table and in main table just pointer to another one. This way you can avoid unnecessary traffic.