Okay, I just noticed, its the $Link it doesn't like, not the $Query.
Here's the thing. This is a school site. There are several schools and this code in it's entirety is simply pasted to each site. All of the same code is there. All of it, not just part. The school names are changed, and the content of the database, but the code in it's entirety is the same.
To keep ife simple, I have one function named db_connect that is "included" to connect to the database.
Code: Select all
$Host = "localhost"; // server name
$User = "user"; // database param
$Password = "pass"; // database param
$dbName = "name"; // database name
$Link = mysql_pconnect($Host, $User, $Password);
mysql_select_db($dbName, $Link); // link to the main database by default
This works everywhere on three sites, including the calendar, and it works everywhere on this site except the calendar. The only difference between the sites is all are running versions of MySQL earlier than 4.1 except this one. The only difference between other locations in this site where the db is accessed and the calendar is that the other locations are in the root and the calendar is in a subdirectory, and this is the only one selected by Date. (The others are sorted by date.) The db_connect is in the subdirectory with the calendar, and functions in the root can use it, but the calendar, seemingly, cannot.
Edit: $Query = "SELECT * FROM eh_event WHERE 'Date'='$D'";
Edit2: Tried without the $Link. No joy.
Don't give up guys, kep the ideas coming.