Drongo_III Posted September 26, 2012 Share Posted September 26, 2012 Hi Guys I have recently taken up a new job. I am noticing a lot of bad practices, at least that's how they occur to me, and i was hoping to get your opinion on the following: Is it worth using mysql_pconnect ? I know php.net doesnt advise using it. The site gets a lot of visitors - typically around 700-800 hits a week - so would this justify using mysql_pconnect? And should you therefore use it on sites where you get a lot of traffic to reduce overhead? Or is it just pointless and would it be ok ot just use mysqli connect? A lot of the code is very procedural. One of the include files connects to the database using the method above and then there are mutliple lines lines of mysqli_query, mysql_fetch_assoc (30 plus lines of this). But none of these are surrounded by any logic so it would appear that everytime the include is called all of these statements are executed and all result sets retrieved. Would I be correct in thinking this is a tragically bad approach? OR is this something that works ok because they'ved used mysql_pconnect? Thanks... drongo Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.