Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6788251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:27:48+00:00 2026-05-26T17:27:48+00:00

This is about Android and SQLite database. Simply, I want to know, how can

  • 0

This is about Android and SQLite database.

Simply, I want to know, how can I assign value to variable that get from the Database table?

I have table called wish and colmns are date[date value string], phoneno[phone no string] and wishtype[simply a string].

All I want is get phoneno, and wishtype according to usergiven date[input to the query will be the date] and assign those two into seperate variable.

I tried out so many methods, but it gives me a runtime errors.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:27:49+00:00Added an answer on May 26, 2026 at 5:27 pm
    String phone_no;
    String wish_type;
    Cursor c = getContentResolver().query(your_table_uri, 
      new String[] {"_id", "phone_no", "wish_type", "date" /*these are your column names*/},
      "date=?", your_date_filter, null);
    if(c.moveToFirst()) { // checks if c retrieves anything. you may want to check first if   c!=null
          phone_no = c.getString(c.getColumnIndex("phone_no"));
          wish_type = c.getString(c.getColumnIndex("wish_type"));
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing this Android application where users can update their SQLite database to the
We know that Android uses SQLite as its default database. My question is: Is
I'm currently developing an Android game which saves data into a SQLite database. This
I want to bulk insert about 700 records into the Android database on my
This is about a web app that serves images. Since the same request will
I know about this question: Which (third-party) debug visualizers for Visual Studio 2005/2008 do
This link describes my problem exactly: http://old.nabble.com/Android-database-corruption-td28044218.html#a28044218 There are about 300 people using my
I'm having some trouble searching a SQLite database in my Android app. I use
I keep getting this error about my sql database NEW ERROR 07-03 01:52:08.037: ERROR/AndroidRuntime(627):
Hi everyone I'm trying to think about how to get some database designs done

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.