Re: How do I put a new Database field into an existing grid?
I used debug mode and this is my new sql I am trying to get to work:
SELECT
session.idSession,
session.idleader,
employee.idemployee,
concat(employee.lastName,', ',employee.firstName) as EmpName,
employee.employeeID,
concat(departments.deptName,'(',employee.departments_iddepartments,')') as EmpDept,
employee.yearsServiceCurrent as YOSCurrent,
employee.yearsServiceTotal as YOSTotal,
employee.hireDate as HiredDate,
employee.salaryGrade,
employee.jobTitle as EmpTitle,
codes_current.idemployee,
codes_current.idSession,
codes_current.date,
codes_current.idsystem_codes,
codes_current.devPlan,
codes_current.turnoverProbability as TOProb,
codes_current.currPerfAppraisal as CurrPerfAppr
FROM
session INNER JOIN codes_current ON session.idSession = codes_current.idSession
INNER JOIN employee ON codes_current.idemployee = employee.idemployee
INNER JOIN departments ON employee.departments_iddepartments = departments.iddepartments
WHERE
(session.idSession = '5')
But this is what was output in debug in the app:
(mysql): SELECT session.idleader as session_idleader, session.idSession as session_idsession from session INNER JOIN codes_current ON session.idSession = codes_current.idSession INNER JOIN employee ON codes_current.idemployee = employee.idemployee INNER JOIN departments ON employee.departments_iddepartments = departments.iddepartments where (session.idSession = '5') LIMIT 0,17
Like I said, the sql works in the sql builder and gives me results and works perfectly.
The application originally had a different sql statement, and when I updated it to the above, this is when I started getting this debug output…
thanks for any help anyone can give…
David