SQL functions can result on unexpected results when there are , (commas) inside.
Thats because the select method (DB_query_builder.php) processes its arguments (the selects - $select) with an explode by , (commas) regardless of the content.
My solution, simply ignores the functions and its parameters. So it won't check the validity of the parameters nor add the database prefix when needed.
Based on this thread:
FIX - Ignores SQL functions on the SELECT statement.
I agree with the functionality this provides but I disagree with the code implementation of throwing [function] into this.
I also don't think this is the best solution. The do while is just weird syntax.
Related: #634 -- Your solution essentially does the same as mine (temporarily replacing text to preserve the correct explode() results) but in a more convoluted way. Maybe implement something more like that.
Thks a lot for your opinion guys.
I have to agree, the proposed patch is not suitable.