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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:38:22+00:00 2026-05-30T18:38:22+00:00

I am building some new additions to an existing WebApp. The old code was

  • 0

I am building some new additions to an existing WebApp. The old code was written using mysql functions. Changing the entire application to use PDO would be a VERY man-hour-intense thing to do. However, for all new code, I’d like to begin using PDO.

Are there any concerns I need to be aware of for using PDO within an existing application that does NOT use PDO to interface with the database? It’s no problem to connect to the DB using both/either of these options at the same time when a page is loaded, correct?

While I’m at it – I am interested to know how big the need is to close a PDO connection after a page loads – or is it fine to leave the connection open?

Thanks all.

  • 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-30T18:38:23+00:00Added an answer on May 30, 2026 at 6:38 pm

    There’s no need to close any type of database connection when a page finishes loading – PHP always does this for you (unless you make the mistake of enabling persistent connections).

    However, if you use PDO AND mysql_ in the same page, connecting to the same database, it will consume twice as many connections (while the page is executing) on the server. This may or may not be a problem.

    Personally I would recommend that you remain consistent within the application if you don’t want to refactor it to use PDO throughout.

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

Sidebar

Related Questions

I am considering building some services using the new Web API that's introduced in
I'm building some functional tests for a web site using Selenium, and I'm stuck
I am building some software using Clojure as a backend, and I'd like to
I am building some basic HTML code for a CMS. One of the page-related
I'm building some business objects for a new project and I'm wondering whether it
I'm building an Android Application (minimum SDK Level 10, Gingerbread 2.3.3) with some Fragments
I'm building a webapp with role based access control using Acegi (Spring) security. So
I'm building some <table> data dynamically using jQuery, but I'm getting the following error:
I'm new to opengl. As a learning exercise I started manually building some basic
We are building a new site using Symfony2, and Assetic looks very promising for

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.