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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:40:47+00:00 2026-05-30T21:40:47+00:00

When coding with databases on the web with say php and mysql you have

  • 0

When coding with databases on the web with say php and mysql you have to sanitize the data before you insert it into the database to make sure someone doesn’t escape quotes etc. Is this necessary in Android and MySQLite? Does it automatically sanitize? Or is it just unnecessary?

  • 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-30T21:40:49+00:00Added an answer on May 30, 2026 at 9:40 pm

    1) Yes, reagrdless of platform, you need to sanitize any inputs that comes from untrusted sources (from the user, another system, another app, etc – anything not hardcoded into your application).

    2) Yes, you need to do this in Android when accessing a SQLite database (be that directly or through a Content Provider).

    3) Sanitizing your inputs before using them in a SQL command to a database is necessary, but it cannot prevent all forms of SQL Injection. The best strategy to prevent this is to make use of Parameterized Queries, which allow the database to distinguish between what is meant to be data and what is meant to be command, so even if a bad input sneaks in and SQL commands appear in the data, the database knows to treat them as data. In standard Java coding, this involves the use of PreparedStatements. In SQLite/Android, you need to use compileStatement to create your queries with placeholders for the data (what is derived from untrusted input) and use bindString to set those placeholders.

    More about this in the excellent OWASP SQL Injection writeup.

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

Sidebar

Related Questions

We have a web-based application, backed by a MySQL database. One part of the
I'm coding a team collaboration web app in PHP, and I have a few
Im coding a simple c/gtk+ app connected to a mysql database. The gui and
I have data coming from the database in the form of a DataSet .
I am coding a web based exam application in PHP. The examinee has to
I have a web based program which chooses some records from a database using
I am coding an online notes web application, and want to have support for
A web project I'm coding for uses a complex CSV to MySQL converter to
I just start coding in PHP, i wrote my first php + mysql program
Say you're coding some kind of web application. Something where people can contribute content,

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.