Hello..
I couldnt find anything for this topic. I know how to connect to a mysql database and close the connection.But that means that for every script a connection should be established and closed.
Is this right and ok for big projects? About 200 concurrent users for example;
Having a single connection stored globally if this is possible but it must be (havent tried) is right? Wouldnt there be security issues or problems with getLastInsertedID ?
SO what is the best solution for handling connections;
parhs
0
Newbie Poster
Recommended Answers
Jump to PostIf you're thinking large scale you might want to start thinking about an ORM to handle your object model and connections. Doctrine, Propel and Creole are 3 of the bigger ORMs in PHP.
Jump to PostHm, I think that the question was whether multiple visits on a database-driven site would be handled well, because each php page, which requires data from the db, would initiate a new sql session as well in order to insert, update or retrieve.
The solution is called persistent link and …
All 5 Replies
ShawnCplus
456
Code Monkey
Team Colleague
parhs
0
Newbie Poster
Rhyan
parhs
0
Newbie Poster
pkpandit
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.