Welcome Guest, Not a member yet? Register   Sign In
csv_from_result possible bug when joining tables?
#1

[eluser]mazaka[/eluser]
Hi all,

I am using csv_from_result for the first time.

The resultset I am feeding it is based on a join of at least 2 tables.

I am basically joining like this: table1.id = table2.id

The resultset then includes two columns called "id". This seems to cause some issues in the csv function since the data for the second column is missing and is causing all data columns to shift left one "step" and therefore renderes the csv export unusable.

I unsuccessfully looked at using a fancier join to get rid of the duplicate columns.

Anyway, I wish the csv_from_result would be able to handle multiple columns - ether consolidate them, or populate all of them.

I know I could specify what columns to output in the SELECT colname1, col2 part, but my tables have about 15 cols and I also want to keep it flexible using SELECT table.* since cols may be added later etc.

It anyone has a solution please share!




Theme © iAndrew 2016 - Forum software by © MyBB