Re: I need answers of following questions can any body plz tell me.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Zubain

1.) the actuall difference between mysql_connect and mysql_pconnect is very
simple.

*mysql_pconnect()* acts very much like mysql_connect() with two major
differences.

First, when connecting, the function would first try to find a (persistent)
link that's already open with the same host, username and password. If one
is found, an identifier for it will be returned instead of opening a new
connection.that means u can actually reuse the connection.

Second, the connection to the SQL server will not be closed when the
execution of the script ends. Instead, the link will remain open for future
use (*mysql_close() will not close links established by **mysql_pconnect()*).


This type of link is therefore called 'persistent'.

2.) about ur second query i cannot understand. :).


Chaitanya

"A man can get discouraged many times but he is not a failure until he stops
trying..."

"I would love to change the world, but I can't get the source code."


On Tue, Mar 2, 2010 at 1:56 PM, zubair nawaz awan <zubairnawazawan@xxxxxxxxx
> wrote:

>
>
> Hi all,
>        I need answers of following questions can any body plz tell me.
>
> When to use mysql_connect and when to use mysql_pconnect actually i search
> around internet there i didnt found any real example. Is there any body who
> can give me any real example easy to understand the usage.How can i use
> transaction based queries like if i there are more than one dependent
> queries that i want to save in db with out any risk (one query is executed
> and the other failed due to disconnection with database). Some thing i found
> to use INNODB as engine instead of MyISAM but i dont know abt it very much.
> Please help me out for this also plz give me some example with code if
> possible.I shall be thank full to you...
>
> Regards
> Zubair Nawaz Awan
> PHP Developer
>
> [Non-text portions of this message have been removed]
>
>  
>


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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux