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 7957785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:18:46+00:00 2026-06-04T04:18:46+00:00

I am currently writing an app that I have a SQLite DB that contains

  • 0

I am currently writing an app that I have a SQLite DB that contains data on a Tradable Collection Card Game. Each card has a Name, Power rating, Card Set, Color, and other info. What I am trying to find out is how to write a query statement to say someone wants to search for a card called Moses, they can type the name in and get the result of all the different Moses cards in the database, but say they want to narrow it down, and they know Moses was a White card, they can then type in Moses, then click on a button called White, then submit, this then queries the DB for the Moses card that in the color column is the word White and then displays the result. Now a step further, what if they wanted to find all the cards in say Color White and Blue from the Kings set, I would like to be able to click and select the White and Blue Button plus the button that says Kings, then hit submit, this then returns the results for all cards in the Kings Set that are White and Blue and displays the results in a new window that they can click on the name and it will brign up another window with all the info on that card?

I know it is a lot of info, any help?

  • 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-06-04T04:18:47+00:00Added an answer on June 4, 2026 at 4:18 am

    You need to write some methods in your dbhelper:

    public Cursor fetchSearch(String find) {
        String query = "SELECT name, power, set, color FROM cards WHERE name = '" + find + "%'";
        return mDb.rawQuery(query, null);
    }
    
    public Cursor fetchSearchColor(String find, String color) {
        String query = "SELECT name, power, set, color FROM cards WHERE name = '" + find + "%' AND color = '" + color + "'";
        return mDb.rawQuery(query, null);
    }
    

    You would call fetchSearch for the plain search, and fetchSearchColor for the search for a specific color. From here you can probably work out how to do multiple color searches.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing a small app that takes data provided by an SQL stored
I'm currently writing an iOS app and I have many records that I'm writing
I'm writing a personal app that scrapes data from a website. It currently pulls
Im currently writing an iphone app that requires the downloading of data that needs
I am currently writing an app that calls for the recording and real time
I'm currently writing a Java app that interfaces with a MySQL database. My problem
I'm currently writing an app in Android that works with the GPS. At the
I'm currently writing a Rails app, and hit a somewhat strange quirk. I have
I'm currently writing a script editing app in c# to edit game scripts. I
I am currently writing my first Android app and have based most of my

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.