Ticket #779 (closed Bug: fixed)
wrong join statement in Database drivers
| Reported by: | Steffen | Owned by: | Shadowhand |
|---|---|---|---|
| Priority: | major | Milestone: | 2.2.1 |
| Component: | Libraries:Database | Version: | SVN HEAD |
| Keywords: | Cc: |
Description
The generated statement is something like "JOIN (article_authors) ON ( article_authors . author_id = authors . id )" which results in an SQLite error cause ist can't find "article_authors . author_id".
Patch proposal:
--- Pdosqlite.php
+++ (clipboard)
@@ -149,7 +149,7 @@
if (count($database['join']) > 0)
{
- $sql .= ' '.$database['join']['type'].'JOIN ('.implode(', ', $database['join']['tables']).') ON '.implode(' AND ', $database['join']['conditions']);
+ $sql .= ' '.$database['join']['type'].'JOIN '.implode(', ', $database['join']['tables']).' ON '.implode(' AND ', $database['join']['conditions']);
}
if (count($database['where']) > 0)
Change History
Note: See
TracTickets for help on using
tickets.
