Actually no, this is just adding fields to my query...I already have $sql = "SELECT * FROM orders"; outside of my function if you take a look at the entire code. What I am trying to do is add additional columns to $fields = array('id','type'); .... for example: $fields = array('id','type','etc'); and then have it pass through my function wpquery_select , which its already doing, and then have it add $rows['?'] to display or however I specifiy in my loop, without having me to manually add the columns to echo in the while loop.
while($row = $results->fetch_assoc()){
echo $row['id'] . "then" . $row['type']; // <--- I don't want to manually specifiy here the column to display...would like it to be added automatically if I have added columns to my $fields = array('id','type','etc');
}