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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:17:45+00:00 2026-06-06T01:17:45+00:00

I am putting together a fairly simple web app that uses user inputted data

  • 0

I am putting together a fairly simple web app that uses user inputted data to act upon an sqlite database and it was brought to my attention ‘sanitizing’ strings was possibly not enough and could raise further problems. As I understand it I should use prepared statements. In my research I found there is PDO(php data object) that has a prepare function and also the php sqlite3 extension also offers a prepare statement. If it matters, at this point there is no login and no sensitive info in the database.

The PDO seems ‘alien’ to me and I do not really understand why/how I need to use it. I can copy/paste the code and get it to work, but the ‘idea’ of it escapes me.

So I guess the question is would the PDO OR sqlite3 prepare function be best and briefly why.

Thanks so much,
Todd

  • 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-06T01:17:46+00:00Added an answer on June 6, 2026 at 1:17 am

    The PDO extension is a wrapper that unifies access to many different databases. As long as the SQL queries you are writing in it are compatible, you can switch databases simply by connecting to a different database in new PDO(...), while not needing to touch the rest of the code.

    The sqlite3 extension exclusively works with SQLite databases. If you want to connect to a different database later, you’ll have to rewrite all the code that uses sqlite3 functions.

    Other than that, prepared statements and how they work is basically identical between these two extensions. I’d vote for PDO, since it offers more flexibility in the long run and means you only have to learn one interface to use many different databases. Note of course that you cannot mix them, you have to use one or the other exclusively. You cannot use the prepare method of one and execute of the other.

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

Sidebar

Related Questions

I'm putting together a simple web page that presents the user with a jQuery
I'm slowly but surely putting together my first rails app (first web-app of any
I'm working on putting together a simple POC app using Fluent NHibernate to attempt
I'm putting together a simple drop down that contains nested ul's. I want it
In putting together a simple Clock application I discovered that Android requires you to
I'm putting together an app that will show a news item's location in Google
I am putting together a simple poller service for one of our web applications,
I am putting together a small app that has a leaderboard concept in it.
I'm putting together a demo web-app. I've created a certificate signed by my own
I putting together a page that will display a set of stored values. I

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.