catfan/Medoo — pull request #45 by jimolina (2013-11-27 16:47:02+00:00)
Title: Let assign ALIAS to Select Columns

Hi

If you need this query:

Select a.name, b.name from section as a left join gallery as b on(a.idsection=b.section_idsection)

In the Medoo format:

$Data = $database->select("section",
[
"[>]gallery" => ["idsection" => "section_idsection"]
],
[
"section.name",
"gallery.name",
]
]);

But you can't differentiate between NAME of Section or NAME of GALLERY. You need have an ALIAS in the query.

And now, the new format to take the query is:

$Data = $database->select("section",
[
"[>]gallery" => ["idsection" => "section_idsection"]
],
[
"section.name",
"gallery.name[>]NameGallery",
]
]);