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!

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.