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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:42:38+00:00 2026-06-12T12:42:38+00:00

I use the cakePHP framework I have a question about how models handle MySQL

  • 0

I use the cakePHP framework I have a question about how models handle MySQL query connections. Basically I have a model which I need to set recursive level of 2, to get to some information in a deeper model. Although I have removed all binding of level 2 models which I do not need the framework is still executing a large number of queries to build the result set.

What I want to know is if the framework opens and closes a MySQL connection for every query or does it open a single connection and executes all the queries and then close the connection?

Thanks

  • 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-12T12:42:39+00:00Added an answer on June 12, 2026 at 12:42 pm

    It seems to me that CakePHP connect to the database and then executes all queries. Look here for the code: https://github.com/cakephp/cakephp/blob/master/lib/Cake/Model/Datasource/Database/Mysql.php

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

Sidebar

Related Questions

I have build an e-commerce website with CakePHP Framework. Now, i need to implement
I have used cakePHP 1.2 and know how to use behaviors in it. using
I am using Cakephp as my framework. I have a problem in uploading my
I have a question about ACL implementation. Is it good to maintain the ACL
I'm planning to develop a web application which will have many static pages (about,
So i use CakePHP 2.0.5 . My model: class User extends AppModel { public
I've started to learn how to use the CakePHP framework for a part time
I have developed a full website with CakePHP framework and we'd like to make
I have a web application that has been done using Cakephp with MySql as
I use cakePHP 2.0 and use the console tool to create one .../app/locale/default.pot .

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.