Loading ...
Sorry, an error occurred while loading the content.

How to work with mysqli_pconnect

Expand Messages
  • ashok kumar
    How to work with mysqli_pconnect Hi I m not getting clear idea even i m searching different sites for the following concept: 1. I shall use mysqli 2. Now, I m
    Message 1 of 2 , Aug 4, 2006
    • 0 Attachment
      How to work with mysqli_pconnect
      Hi I'm not getting clear idea even i'm searching different sites for the following concept:
      1. I shall use mysqli
      2. Now, I'm using mysqli_connect to connect to database in my project.
      3. Can i turn to mysqli_pconnect now?

      Can anyone help please...


      ---------------------------------
      Here’s a new way to find what you're looking for - Yahoo! Answers

      [Non-text portions of this message have been removed]
    • ansar ansar
      Hi Ashok, The difference between mysqli_pconnect and mysqli_connect is:- mysqli_pconnect -mysqli_pconnect maintains persistent connections to a database across
      Message 2 of 2 , Aug 5, 2006
      • 0 Attachment
        Hi Ashok,

        The difference between mysqli_pconnect and mysqli_connect is:-

        mysqli_pconnect -mysqli_pconnect maintains persistent connections to a database across successive requests when used within the module version of php; thus eliminating the cost of re-establishing connections for each new request.

        mysqli_connect - Connection is lost once the scripts end.

        But mysqli will work if u have mysql 4.1 and greater and PHP5.

        It is better to use mysqli_connect rather than mysqli_pconnect because the mysqli_pconnect() function was designed to provide a mechanism for reducing the cost of establishing and closing connections to the MySQL server. Unfortunately, due to an interaction between the architecture of the Apache server and the architecture of PHP, high traffic on a site that used pconnects could quickly clog up the MySQL server with many unused connections that could prevent many of the active connections from accessing the database.


        The best introduction to MySQLi is on the Zend site:
        http://www.zend.com/php5/articles/php5-mysqli.php

        Regards,
        Ansar Ahmed

        ashok kumar <ashok_wisdomleaf@...> wrote: How to work with mysqli_pconnect
        Hi I'm not getting clear idea even i'm searching different sites for the following concept:
        1. I shall use mysqli
        2. Now, I'm using mysqli_connect to connect to database in my project.
        3. Can i turn to mysqli_pconnect now?

        Can anyone help please...


        ---------------------------------
        Here’s a new way to find what you're looking for - Yahoo! Answers

        [Non-text portions of this message have been removed]






        ---------------------------------
        Here’s a new way to find what you're looking for - Yahoo! Answers

        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.