In message <[EMAIL PROTECTED]>, Javed Ahmed <[EMAIL PROTECTED]> writes >Hello, > >I worked in PHP & MySQL for so many days without knowing the actual >use of each and every functions!!! > >The discussion says that if i use mysql_pconnect in one page it >takes the connection to the other pages linked to it as well
...during that session. >and For mysql_connect it gets disconnected on the same page ??? correct > >--------------- >I link file connection.php (mysql_connect) to all the pages that >uses mysql scripts. > >So If i use mysql_pconnect in one page then therewill be no need for >me to link connection.php to all the pages untill I disconnect >it...right? correct. But you could have problems if your users don't log out - the connections will remain for a certain amount of time, and could slow down your server. You need some way to insist that users tell you that they have finished using SQL. Just closing a page will leave the connection open. And any links to any other sites will need to close the connection before they leave. So >untill I disconnect >it might not be too easy to set up. Which is why it isn't always a good idea. >--------------- > >mysql.allow_persistent is anyway affects the connection of PHP >scripts to Mysql? This is a system setting, which defines whether persistent connections would be allowed. You will realise that some hosting companies will not allow persistent connections, since they might not all get closed. Unless you are confident about what you are doing, or you have some very special application, you should stick to mysql_connect. It doesn't take long to connect - remember, your script on the server is connecting to the database on the server - both local to each other. There is no traffic over the internet, so very little time is taken. -- Pete Clark http://www.hotcosta.com http://www.spanishholidaybookings.com Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
