Home » Database » DB_DataObject » Bug #4312
Columnnames with capitals don't link correct in pgsql
Details
| Submitted | 2005-05-10 11:25 UTC |
|---|---|
| From | php at pinna dot nl |
| Status | No Feedback |
| Package | DB_DataObject |
| PHP Version | 5.0.3 |
| OS | Linux / pgsql 8.0.2 |
| Roadmaps | (Not assigned) |
Comments
[2005-05-10 11:25 UTC] php at pinna dot nl
Description:
------------
I try to link fields, ie. companyID for the tables customer and company.
I defined everything in the correct ini files, but it doesn't show anything. When I put on the quote-identifier to on, it works but then I get problems with inserts... (in combination with FormBuilder that is.. and I didn't investigate that further, but it had to do with the same problem)
Also, it seems that when I put on the quote-identifier option, only on some places in the query fieldnames get quoted.
The WHERE clause gets quoted, but the ORDER clause (put there by FormBuilder, gets not)
If i change the fieldnames in pgsql to customer_id, everything is OK...
The quote-identifiers seem to work OK for (just basic) operation in DB_DataObject, but FormBuilder adds the ORDER BY clause and there it goes wrong.. I don't know if that is a matter of DB_DataObject or FormBuilder...
Actual result:
--------------
With quote-identifiers off:
DO_Company: QUERY: SELECT * FROM company WHERE company.companyID = 1
...
DO_Company: Query Error: [DB_Error: message="DB Error: no such field" code=-19 mode=return level=notice prefix="" info="SELECT * FROM company WHERE company.companyID = 1 [nativecode=ERROR: column company.companyid does not exist]"]
And now on:
DO_Company: GET: companyID 1 Array ( )
DO_Company: __find: 1
DO_Company: QUERY: SELECT * FROM "company" WHERE "company"."companyID" = 1
DO_Company: query: QUERY DONE IN 0.00173711776733 seconds