ClanCats / Hydrahon

🐉 Fast & standalone PHP MySQL Query Builder library.
https://clancats.io/hydrahon/master/
MIT License
278 stars 58 forks source link

Select not working within SubQueries #46

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello,

When using the subquery in the developer branch there seems to be an issue with the select function.

for example:

$ret = $builder->select(["a" => function ($q) {
    $q->table("table2");
    $q->select(["column1", "column2"]);
});

Returns: There is no macro or method with the name \"select\" registered.

However as a workaround, if select is changed to fields it works fine, is this intended?

Kind Regards, Joe