This is a discussion on mySQL Connection - In SSI within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi All, I am getting the following error: Access denied for user 'root'@'localhost' (using password: NO) in /usr/local/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi All,
I am getting the following error: Access denied for user 'root'@'localhost' (using password: NO) in /usr/local/psa/home/vhosts/mysite.co.uk/httpdocs/assets/ssi/shared_functions.php on line 130 When running this function: // Return a County name from a County ID function GetCountyNameFromID($idCounty) { $sql = "SELECT county_name FROM VisitorWorld.counties where isCounty = " .$idCounty; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_array($result)) { return $row{'county_name'}; } } The function is in an SSI file called 'shared_functions.php' I include this in my page (process_update.php) like this: include("../assets/ssi/shared_functions.php"); All other activity on my page (process_update.php) works Ok. Note that I have connected to the database above the shared_functions.php include directive (which is also done in an SSI) Any help will be appreciated. Thanks! Simon. -- - * Please reply to group for the benefit of all * Found the answer to your own question? Post it! * Get a useful reply to one of your posts?...post an answer to another one * Search first, post later : http://www.google.co.uk/groups * Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat! -------------------------------------------------------------------------------- I am using the free version of SPAMfighter for private users. It has removed 10214 spam emails to date. Paying users do not have this message in their emails. Try SPAMfighter for free now! |