I am getting the following error on my data processor when I try to load the page with my grid on it whenever I change the column type of any column to combo changing it back fixes the issue. No Data is loading into the grid.
[code]Strict Standards: Declaration of GridConnector::fill_collections() should be compatible with Connector::fill_collections() in /home/ccccp041/public_html/websites/subbies/codebase/connector/grid_connector.php on line 126
Fatal error: Uncaught exception ‘Exception’ with message ‘MySQL operation failed You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘DISTINCT EmpCode
as value’ at line 1’ in /home/ccccp041/public_html/websites/subbies/codebase/connector/db_common.php:965 Stack trace: #0 /home/ccccp041/public_html/websites/subbies/codebase/connector/db_common.php(650): MySQLDBDataWrapper->query(‘DISTINCT `EmpCo…’) #1 /home/ccccp041/public_html/websites/subbies/codebase/connector/db_common.php(674): DBDataWrapper->select(Object(DataRequestConfig)) #2 /home/ccccp041/public_html/websites/subbies/codebase/connector/base_connector.php(834): DBDataWrapper->get_variants(‘EmpCode’, Object(DataRequestConfig)) #3 /home/ccccp041/public_html/websites/subbies/codebase/connector/grid_connector.php(212): DistinctOptionsConnector->render() #4 /home/ccccp041/public_html/websites/subbies/codebase/connector/grid_connector.php(154): GridConnector->fill_collections(‘0’) #5 / in /home/ccccp041/public_html/websites/subbies/codebase/connector/db_common.php on line 965[/code]
I have the following code to get the values for the Combo Box
Employee = timesheetGrid.getColumnCombo(0);
Employee.load("data/Combo/employees.php")
The contents of Employees.php are as follows:
[code]include_once ‘…/…/includes/db_connect.php’;
include_once ‘…/…/includes/functions.php’;
require_once("…/…/codebase/connector/combo_connector.php");
$data = new ComboConnector($res, “MySQL”);
$data->render_table(“INF_EmployeeList”,“EmpCode”,“EmpCode”);[/code]
using the browser inspector I can see that the correct values are loaded for the combo box.
I have the following code to initiate my data processor and load the data the table with data.
timesheetGrid.load("data/timesheets.php");
var dpg = new dataProcessor("data/timesheets.php");
dpg.enableDataNames(true); // will use names instead of indexes
dpg.init(timesheetGrid);
the Contents of timesheet php are as follows:
[code]//TODO: Add Filtering for Week Ending Date
include_once ‘…/includes/db_connect.php’; //Include the DB Connect File
include_once ‘…/includes/functions.php’; //Include the Functions File
sec_session_start(); //Start the Secure Session
$EmployerID = $_SESSION[‘username’]; //Employer Code
$AccessLvl = $_SESSION[‘EmpAccessLvl’]; //EmployerAccessLvl
$MYOBSupplierID = $_SESSION[‘MYOBSupplierID’];
require("…/codebase/connector/grid_connector.php");//adds the connector engine
$conn = new GridConnector($res,“MySQL”); //initializes the connector object
if ($conn->is_select_mode()) {//code for loading data
if ($MYOBSupplierID == $EmployerID) {
$conn->render_complex_sql("SELECT
INF_TimeEntries.ID as masterid,
INF_TimeEntries.EmpCode,
INF_EmployeeList.EmpName,
INF_TimeEntries.TrnDate,
INF_TimeEntries.WeekEndingDate,
INF_TimeEntries.Project,
tINF_ProjectList.Description,
INF_TimeEntries.JoineryItem,
Inf_Jobs.jmpPartShortDescription,
Inf_Jobs.ujmpLevel,
Inf_Jobs.ujmpRoom,
INF_TimeEntries.WorkType,
INF_TimeEntries.Hrs,
INF_TimeEntries.IsReDo,
INF_TimeEntries.JCNotes,
INF_TimeEntries.GPSCoords
FROM INF_TimeEntries
LEFT OUTER JOIN INF_EmployeeList ON INF_EmployeeList.EmpCode = INF_TimeEntries.EmpCode
LEFT OUTER JOIN tINF_ProjectList ON tINF_ProjectList.Project = INF_TimeEntries.Project
LEFT OUTER JOIN Inf_Jobs ON Inf_Jobs.jmpJobID = INF_TimeEntries.JoineryItem
WHERE INF_EmployeeList.MYOBSupplierID = $EmployerID
ORDER BY EmpCode ASC",
"masterid",
"EmpCode,
EmpName,
TrnDate,
WeekEndingDate,
Project,
Description,
JoineryItem,
jmpPartShortDescription,
ujmpLevel,
ujmpRoom,
WorkType,
Hrs,
IsReDo,
JCNotes,
GPSCoords");
}
elseif ($AccessLvl >= 9) {
$conn->render_complex_sql("SELECT
INF_TimeEntries.ID,
INF_TimeEntries.EmpCode,
INF_EmployeeList.EmpName,
INF_TimeEntries.TrnDate,
INF_TimeEntries.WeekEndingDate,
INF_TimeEntries.Project,
tINF_ProjectList.Description,
INF_TimeEntries.JoineryItem,
Inf_Jobs.jmpPartShortDescription,
Inf_Jobs.ujmpLevel,
Inf_Jobs.ujmpRoom,
INF_TimeEntries.WorkType,
INF_TimeEntries.Hrs,
INF_TimeEntries.IsReDo,
INF_TimeEntries.JCNotes,
INF_TimeEntries.GPSCoords
FROM INF_TimeEntries
LEFT OUTER JOIN INF_EmployeeList ON INF_EmployeeList.EmpCode = INF_TimeEntries.EmpCode
LEFT OUTER JOIN tINF_ProjectList ON tINF_ProjectList.Project = INF_TimeEntries.Project
LEFT OUTER JOIN Inf_Jobs ON Inf_Jobs.jmpJobID = INF_TimeEntries.JoineryItem
ORDER BY EmpCode ASC",
"ID",
"EmpCode,
EmpName,
TrnDate,
WeekEndingDate,
Project,
Description,
JoineryItem,
jmpPartShortDescription,
ujmpLevel,
ujmpRoom,
WorkType,
Hrs,
IsReDo,
JCNotes,
GPSCoords");
}
else {
$conn->render_complex_sql("SELECT
INF_TimeEntries.ID as masterid,
INF_TimeEntries.EmpCode,
INF_EmployeeList.EmpName,
INF_TimeEntries.TrnDate,
INF_TimeEntries.WeekEndingDate,
INF_TimeEntries.Project,
tINF_ProjectList.Description,
INF_TimeEntries.JoineryItem,
Inf_Jobs.jmpPartShortDescription,
Inf_Jobs.ujmpLevel,
Inf_Jobs.ujmpRoom,
INF_TimeEntries.WorkType,
INF_TimeEntries.Hrs,
INF_TimeEntries.IsReDo,
INF_TimeEntries.JCNotes,
INF_TimeEntries.GPSCoords
FROM INF_TimeEntries
LEFT OUTER JOIN INF_EmployeeList ON INF_EmployeeList.EmpCode = INF_TimeEntries.EmpCode
LEFT OUTER JOIN tINF_ProjectList ON tINF_ProjectList.Project = INF_TimeEntries.Project
LEFT OUTER JOIN Inf_Jobs ON Inf_Jobs.jmpJobID = INF_TimeEntries.JoineryItem
WHERE INF_EmployeeList.EmpCode = $EmployerID
ORDER BY EmpCode ASC",
"masterid",
"EmpCode,
EmpName,
TrnDate,
WeekEndingDate,
Project,
Description,
JoineryItem,
jmpPartShortDescription,
ujmpLevel,
ujmpRoom,
WorkType,
Hrs,
IsReDo,
JCNotes,
GPSCoords");
}
}
else { //code for other operations - i.e. update/insert/delete
$conn->render_table("INF_TimeEntries", "ID", "EmpCode,TrnDate,WeekEndingDate,Project,JoineryItem,WorkType,Hrs,IsReDo,JCNotes,GPSCoords");
}[/code]
Everything Functions as expected without the Combo Box but adding a combo column breaks everything.
I am at a complete loss as to how to proceed.