Jump to content

[SOLVED] connection issues + slowing down of localhost or website


newbie69

Recommended Posts

I recently developed a simple CMS.

 

Its being working well for a few weeks while testing and developing. But recently my localhost is taking a long time to display the page.

 

My websites consist of the front and and back end which includes _dbconnections.php

 

in _dbconnections i have:

 

function getMysqlResult($sqlStatement){

$user = "csi";
$password = "csi";
$host = "localhost";
$database = "csi2008";


$connection = mysql_connect($host,$user,$password) or die ("could not connect ot the server ".mysql_error());

$db = mysql_select_db($database,$connection) or die (mysql_error());
$result = mysql_query($sqlStatement) or die ("cannot do the query".mysql_error());
return $result;

}

 

Each page includes this page as i want to call the function whenever i query the db.

 

I also include the following pages on all pages:

 

include("php_scripts/_miscFunctions.php");
include("php_scripts/_frontendfunctions.php");

 

The above pages also contains functions, some of which calls the connection function in  _dbconnections.php.

 

Can any one advise if this will cause my website to underperform?

 

Thanks alot!

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.