# Using a QR code to retrieve specific data from a database

**URL:** https://community.thunkable.com/t/using-a-qr-code-to-retrieve-specific-data-from-a-database/1183660
**Category:** Questions about Thunkable X
**Tags:** beginner, qrcode, help
**Created:** [March 23, 2021, 10:20pm UTC](https://community.thunkable.com/t/using-a-qr-code-to-retrieve-specific-data-from-a-database/1183660 "2021-03-23T22:20:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![darkevix101ed0z0r](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@darkevix101ed0z0r](https://community.thunkable.com/u/darkevix101ed0z0r)
#### Post date: [March 23, 2021, 10:20pm UTC](https://community.thunkable.com/t/using-a-qr-code-to-retrieve-specific-data-from-a-database/1183660/1 "2021-03-23T22:20:02Z")

</div>

I am building a mobile app for my Computer Science IA (Part of my school’s IB program), and I’m encountering a logistical problem I don’t know enough about to answer on my own.

I want to make it so that when the app scans a specific QR code, it’ll pull specific information from the real-time database provided by Firebase and display it in the app. I already have some test data that I imported into the database from Google Sheets but I have no idea how I would go about getting a QR code to tell the database to do something like that.

I know they usually contain URL’s and that’s all I’ve been able to find people discussing in regards to uses for QR codes but not much beyond that.

Any help anyone can provide would be greatly appreciated.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [March 23, 2021, 10:42pm UTC](https://community.thunkable.com/t/using-a-qr-code-to-retrieve-specific-data-from-a-database/1183660/2 "2021-03-23T22:42:31Z")

</div>

You can store all sorts of data in a QR code but typically it’s a URL or plain text.

So, if I understand correctly, you want the user to scan a QR code and, for example, if the QR code returns the result “Pizza” then you’ll get the “Pizza” section of the Firebase data?

Do you have a sample QR code you can post?

You can use the barcode scanner in Thunkable to retrieve the value stored in the QR code:

[https://docs.thunkable.com/barcode-scanner](https://docs.thunkable.com/barcode-scanner)

---

<div class="post-metadata">

### Author: ![darkevix101ed0z0r](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@darkevix101ed0z0r](https://community.thunkable.com/u/darkevix101ed0z0r)
#### Post date: [March 24, 2021, 1:08am UTC](https://community.thunkable.com/t/using-a-qr-code-to-retrieve-specific-data-from-a-database/1183660/3 "2021-03-24T01:08:01Z")

</div>

Hold on I think I just thought of a solution. I think just having the code contain plaintext of a title and then making an “if-then” statement to test if what it scans matches to a bucket in my database would work. What do you think?

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [March 24, 2021, 5:04am UTC](https://community.thunkable.com/t/using-a-qr-code-to-retrieve-specific-data-from-a-database/1183660/4 "2021-03-24T05:04:23Z")

</div>

Yes, you could definitely do that.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:25pm UTC](https://community.thunkable.com/t/using-a-qr-code-to-retrieve-specific-data-from-a-database/1183660/5 "2024-11-08T13:25:47Z")

</div>


