I'm creating a method that will see if a column in a database row is populated; and if so, it returns the varchar in that row, else it calls a web service to return that data.
My question is: What is the standard way of simply selecting a column with Android? (select mycolumn from mytable where _id = x;)
I've created a ContentProvider around my database. Should I just call开发者_运维问答 'query' directly? Note: This method is in a Service
you just need to mess with the selection argument in the query
String selection = MyDatabaseConstants.ID " = " + String.valueOf(x);
Cursor c = getContentResolver().query(MyDatabaseConstants.Content_URI,MyDatabaseConstants.Proj, selection,null,null,null);
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论