开发者

iPhone SQLite questions - SELECT WHERE

开发者 https://www.devze.com 2023-03-26 14:31 出处:网络
I got an application using SQLite to save data. and 2 Field of Data, 1. Title, 2. Category. For example, I saved 3 rows of Data

I got an application using SQLite to save data. and 2 Field of Data, 1. Title, 2. Category.

For example, I saved 3 rows of Data

Title Category


  • Johnny's birthday BIRTHDAY

  • Meet Johnny OTHER

  • Mom's birthday BIRTHDAY


I've already get all of these data and display on tableV开发者_如何学运维iew, Now when user wants to display data that belongs to "BIRTHDAY" category, (which is "Johnny's birthday , Mom's birthday")

How to make this function? I know using SELECT WHERE.... but still can't figure out :(


I know how to write the SQL query to display only single data.

but I have multiple data's, so I'm searching for help to display multiple data..

PS. I'm using UIPickerView to let users choose Categories.


SELECT * FROM `table` WHERE category = "BIRTHDAY";


Select title, category from YOURTABLE where category= "BIRTHDAY"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号