For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > October 2006 > mySQL Connection - In SSI









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author mySQL Connection - In SSI
Simon Harris

2006-10-12, 6:58 pm

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!


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com