DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

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

By: Admin | 09 Mar 2010 12:19 pm

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

Comments

Hi,

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' .

 

By: Admin | 09 Mar 2010

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move