I’m messing around with a tutorial
http://www.kendoui.com/blogs/teamblog/posts/12-01-18/get_rolling_with_kendo_ui_and_php_ndash_part_1.aspx
and using the postgres northwind port from here:
http://code.google.com/p/northwindextended/downloads/detail?name=northwind.postgre.sql
I cannot get this query to execute on the db:
SELECT TRIM(t.TerritoryDescription) AS TerritoryDescription
FROM Territories t
INNER JOIN EmployeeTerritories et ON t.TerritoryID = et.TerritoryID
INNER JOIN Employees e ON et.EmployeeID = e.EmployeeID
WHERE e.EmployeeID = 1
The error is:
ERROR: column t.territoryid does not exist LINE 3: INNER JOIN EmployeeTerritories et ON t.Territory
but the table territories and the territoryid column are both there.
The problem is that in the SQL that you have used to create the database, you are using quoted column names:
Since you used quoted names, postgres expects the column case to match. However it will by default lowercase all column names:
From the PHP pgsql documentation.
So, quote your column names in
""when you execute the query.