Task #232 — Sort error with postgresql and join
Attached to Project— EZPDO
Opened by Diego Novo (dgnovo) - Thursday, 12 Jul 2007, 11:45am
| Bug Report | |
| Object query | |
| Unconfirmed | |
| No-one | |
| All |
| High | |
| Normal | |
| 1.1.x | |
| Undecided | |
|
I use this query $search = $this->ezpdo->find("from Film as f, FilmLingua as fl where fl.film = f and fl.lingua = ? " . $str_order_by . " " . $limitation . " ", $obj_lingua->lingua); and ezpdo return this error: Fatal error: Uncaught exception 'epExceptionDbPeardb' with message 'DB Error: unknown error, query: SELECT DISTINCT "f".* FROM "Film" AS "f", "FilmLingua" AS "fl" LEFT JOIN "_r_film_filmlingua" AS "_1" ON "_1".var_a = 'film' AND ("_1".class_a = 'FilmLingua' AND "_1".oid_a = "fl"."e_oid") LEFT JOIN "Film" AS "_2" ON "_1".base_b = 'Film' AND "_1".class_b = 'Film' AND "_1".oid_b = "_2"."e_oid" LEFT JOIN "_r_filmlingua_lingua" AS "_3" ON "_3".var_a = 'lingua' AND ("_3".class_a = 'FilmLingua' AND "_3".oid_a = "fl"."e_oid") LEFT JOIN "Lingua" AS "_4" ON "_3".base_b = 'Lingua' AND "_3".class_b = 'Lingua' AND "_3".oid_b = "_4"."e_oid" WHERE ("_2"."oid"="f"."oid") AND ("_4"."e_oid"=3) ORDER BY "fl"."titolo" desc' in /var/www/web/web/core/ezpdo.1.1.6/src/db/epDbPeardb.php:178 I use PEAR-DB but there is the same error with adodb. If i copy the query in Postgresql without DISTINCT, it work. |
This task depends upon
This task blocks these from closing
Comments (1) | Attachments (0) | Related Tasks (0/0) | Notifications (2) | Reminders (0) | History |
Comment by Alessio - Thursday, 12 Jul 2007, 12:12pm
I modified the function _execute (epDbPeardb.php) and the generated query has not "DISTINCT", but it did't work.