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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:42:27+00:00 2026-05-31T03:42:27+00:00

I stumbled in the community for my problem but I could not find a

  • 0

I stumbled in the community for my problem but I could not find a solution-maybe it is to specific. The following sequence of functions / operations I am executing in PHP:

  1. construct a object of class_1
  2. function in class_1 connects to MySQL without a defined link identifier
  3. then I create a temporary table [..functions in class_1 do something..]
  4. a new function is called which create a object_2 of class_2
  5. in object_2 I create a new MySQL connection with the parameter of creating a new link true and link identfier
  6. I close the MySQL connection with MySQL_close in object_2 with the link identifier
  7. in object_1 the temporary table still not exists / it try to reconnect to MySQL automatically

If I do not create object_2 everything works fine. what I am doing wrong?

  • 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-31T03:42:28+00:00Added an answer on May 31, 2026 at 3:42 am

    Thanks to everybody for help finding a solution. The link identifier solution is as mentioned bit poor for me. at php.net is a detailed description of my problem and some hints how to solve:

    Here is how shared links work:
    – Each link is a resource. mysql_connect() by default looks for a resource with the same paramaters. If one exists, it will return the
    existing resource.
    – Every assignment of that resource to a variable increases the resource’s reference count.
    – When the reference is decremented to zero, the underlying TCP/socket connection is closed.
    – Every assignment of a variable away from that resource decrements the reference count. (This includes a function level
    variable going out of scope)
    – mysql_close() also decrements the reference count.

    Note the last two points: mysql_close() and reassignment of a
    variable decrement the link’s reference count.

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

Sidebar

Related Questions

I stumbled on a problem I was able to work around, but I'm not
I stumbled upon a problem from the last Facebook Hacker Cup (so it's NOT
Ever stumbled on a tutorial that you feel is of great value but not
I stumbled on the same problem of nested templates described here . The following
I stumbled across this problem in F#. Suppose, I want to declare two types
I stumbled across the WB on-disk B-tree library: http://people.csail.mit.edu/jaffer/WB It seems like it could
I stumbled upon this while doing a review and the author is not available:
I stumbled upon the following construction in C++: bool result = false; for(int i
I stumbled across the following shortcut in setting up a for loop (shortcut compared
I stumbled upon a rather exotic c++ namespace problem: condensed example: extern C {

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.