Hello,
Thanks for the nice library.
Would be great if it's possible to define the query result types when call get() function and maybe another functions that return a list of rows.
Now it's returning array of stdClass objects, but sometimes it's easy to work with array of arrays. For example when using WP_List_Table WordPress class it's expect arrays by default.
This is the line that i'm having the issue:
https://github.com/stephenharris/WP-Query-Builder/blob/master/src/Query.php#L296
Doing for example this code will fetch the arrays:
$results = $this->db->get_results($sql, ARRAY_A);
I'm trying to extend the class Query and get() method but because it have some private attributes i need basically to rewrite the entire class.
Thanks
Hello,
Thanks for the nice library.
Would be great if it's possible to define the query result types when call get() function and maybe another functions that return a list of rows.
Now it's returning array of stdClass objects, but sometimes it's easy to work with array of arrays. For example when using
WP_List_TableWordPress class it's expect arrays by default.This is the line that i'm having the issue:
https://github.com/stephenharris/WP-Query-Builder/blob/master/src/Query.php#L296
Doing for example this code will fetch the arrays:
$results = $this->db->get_results($sql, ARRAY_A);I'm trying to extend the class
Queryand get() method but because it have some private attributes i need basically to rewrite the entire class.Thanks