I have a strange problem where my code works on my hosted domain but not on my local machine and I cannot figure out why? It must be in the PHP.ini or my.ini files.
This is the script that works on the domain but not on my local machine: -
//Open Method @260-9D834628
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect");
$this->CountSQL = "SELECT COUNT(*) FROM Employees_Certs " .
"LEFT JOIN Suppliers ON Employees_Certs.SupplierID = Suppliers.SupplierID " .
"WHERE Employees_Certs.EmployeeID = " . $this->SQLValue($this->wp->GetDBValue("1"), ccsInteger) . " " .
"AND Suppliers.CompanyID = " . $this->SQLValue($this->wp->GetDBValue("2"), ccsInteger) . " " .
"";
This code produces the following SQL Error in my local machine but works on my host.
Database error: Invalid SQL: SELECT COUNT(*) FROM Employees_Certs LEFT JOIN Suppliers ON Employees_Certs.SupplierID = Suppliers.SupplierID WHERE Employees_Certs.EmployeeID = AND Suppliers.CompanyID = 1
MySQL Error: 1064 (You have an error in your SQL syntax near 'AND Suppliers.CompanyID = 1 ' at line 1)
Session halted.
Can anyone suggest where I may have some settings different.
Regards
This is the script that works on the domain but not on my local machine: -
//Open Method @260-9D834628
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect");
$this->CountSQL = "SELECT COUNT(*) FROM Employees_Certs " .
"LEFT JOIN Suppliers ON Employees_Certs.SupplierID = Suppliers.SupplierID " .
"WHERE Employees_Certs.EmployeeID = " . $this->SQLValue($this->wp->GetDBValue("1"), ccsInteger) . " " .
"AND Suppliers.CompanyID = " . $this->SQLValue($this->wp->GetDBValue("2"), ccsInteger) . " " .
"";
This code produces the following SQL Error in my local machine but works on my host.
Database error: Invalid SQL: SELECT COUNT(*) FROM Employees_Certs LEFT JOIN Suppliers ON Employees_Certs.SupplierID = Suppliers.SupplierID WHERE Employees_Certs.EmployeeID = AND Suppliers.CompanyID = 1
MySQL Error: 1064 (You have an error in your SQL syntax near 'AND Suppliers.CompanyID = 1 ' at line 1)
Session halted.
Can anyone suggest where I may have some settings different.
Regards